Same thing happened in China and Mesoamerica. The degree to which people were aware of the change in the characters is debatable, but there was certainly some awareness among the scribes and elites in later centuries (e.g. the Talmud records a debate about the Hebrew writing system). I suspect that at least the elites of Mesopotamia knew that the system had changed because they had access to much older tablets than what they themselves were producing. At a minimum they knew that the language had changed, since they were literate in both ancient Sumerian and whatever the common language of their city was (Akkadian, Elamite, etc.), and they likely recognized regional variations in the characters on tablets they received from other cities.
And, yes, the actual language being written changed as armies swept through, except for religious matters which had to be conducted in (what would have been imagined to match) the original language and pronunciation. Can't expect the gods to learn a new language, or expect incantations to work when pronounced "wrong"!
Apparently the Hindu priesthood, from Vedic times, had a terrifyingly rigorous system for maintaining exact wording and pronunciation for their rites, for that reason; and preserved mathematical lore used for astronomical calculations the same way, before they got to writing it all down many centuries later.
Many Chinese people imagine they can read documents from two millennia ago, but rely on the inherent ambiguity of their script to construct an apparent "poetic" meaning entirely disjoint from what was written.