Hebrew and Syriac descend from the same Aramaic alphabet and answer the question of word-final shapes differently, which makes the pair a good place to see what a letter actually is.
Hebrew developed five final letters, kaph, mem, nun, pe and tzaddi, each a separate character with its own shape, its own place in an inventory, and in the numeral system its own value in the hundreds. They are counted apart from the twenty-two, and a Hebrew alphabet chart shows them as a group of their own.
Syriac did not do this. Its letters change shape according to their position in a joined group, so most of them have initial, medial, final and isolated forms, and none of those forms is a separate letter. A final kaph in the Serto hand drops a long tail below the line and is still kaph. The alphabet is twenty-two letters and a modern character standard nonetheless encodes a good many more Syriac signs, because it also has to carry ligatures, borrowings made for other languages, and one or two positional variants that a hand treats as distinct.
Mim shows the contrast cleanly because Hebrew mem is one of the five and Syriac mim is not. Nothing about the sound differs. What differs is whether a script decided that a shape used in one position deserved to be counted separately, and Syriac, being thoroughly cursive, decided that it did not.