The gemara concludes that the end-letters "Menatstpach" were forgotten until tsufim came and re-instated them.
How could these letters (or their place in a word) have been forgotten since every Sefer Torah must be copied from another sefer torah, and if written by memory it is not a valid Sefer Torah ?
It seems that in their day, every Sefer Torah (except that of Yoshiahu; see what the Rishonim write about Sefer Yoshiahu), was written in K'sav Ivri , as we find in Sanhedrin (21a), for only later did they decide to write the Sefer Torah in Kesav Ashuris (the script used today). In Kesav Ivri the end-letters do not differ from the letters when they come in the middle of a word.
All the best,
Mordecai Kornfeld
Dear Rabbi
To explain more clearly, originally the Sefer torah was written in Ashuris.
It was changed later on to Ivris, and Ezra restored Ashuris. That was when the question arose which letters are at the end which in the middle of
the word.
Yehuda Landy