This entire question is based on a flawed premise.
For one thing the "language of the Pharaohs" was more of a linguistic family. Middle Egyptian might be the language that is best representative of ancient Egypt but by the Late Period it had begun to be replaced by Late Egyptian. Demotic Egyptian is descended from Late Egyptian. So the "Egyptian" language spoken in the days of Cleopatra was not in fact the same spoken in the days of Tutankhamun which was in turn not the same as was spoken in the days of Khufu.
Coptic is descended from Demotic Egyptian, but it is not the same language. Demotic Egyptian script gave way to Coptic in the 5th Century, although both Demotic and Coptic were written in a hieratic script rather than hieroglyphic one. Coptic is still technically spoken in Egypt today and is the official language of the Coptic Church which has survived since Antiquity.
Beginning in the Ptolemaic period (under the Ptolemaic dynasty to which Cleopatra belonged), Greek replaced Demotic Egyptian as the official administrative language. This was because the Ptolemies were a Hellenistic dynasty which sought to integrate their own culture and social structures into Egypt. Many Egyptian texts were also translated into Greek during this time and knowledge of hieroglyphics became further degraded even among those who still learned them. Errors and sloppy hieroglyphs are not uncommonly found during these time periods and they indicate the decline of this already ancient writing system.
Demotic Egyptian was still used by scribes at the local level and was an unofficial administrative language during this time. Although Greek was the de facto language of politics and business at any higher level in Ptolemaic Egypt, the majority of the populace still spoke Demotic Egyptian.
You mention Cleopatra, and I feel obligated to mention that she is thought to be the only member of her dynasty to know Egyptian. Let that sink in a bit. So although Cleopatra learned Egyptian (among apparently eight other languages), it was no longer the language of the kings of Egypt. It was however, still by far the most widely spoken language of the populace but a combination of state policy and broader socio-cultural trends ensured that bilingualism was essentially a necessity for success for all but a few entrenched Egyptian elites (such as priests). Not only did acquiring Greek allow Egyptians to get ahead in business, but political offices at anything above the village level required it.
In the Hellenistic period, Koine Greek became the lingua franca of the Eastern Mediterranean after the Successor States which were carved out his empire by his own generals used it as their administrative language. It was not just Ptolemaic Egypt that saw the rise of Greek language, but also the Seleucid Empire (occupying most of what had been the Achaemenid Empire), the Greek settlements in Sicily and southern Italy, and many other smaller kingdoms in the Mediterranean. This dominance of Greek language continued under Roman rule as the Eastern Mediterranean continued to be largely Graecophone. After the fall of the Western Roman Empire which had been predominantly Latin speaking, Greek became the de facto language of the Roman Empire. In many ways, the use of Greek in the Near East and North Africa mirrors the Medieval use of Arabic. Both emerged on an official level as a result of conquest and on a micro level as a means to interface with a geographically broad commercial and cultural network.
Under Roman rule, Demotic Egyptian disappears from official use, and is replaced by Greek completely. Coptic developed into the most widely spoken but unofficial language of Egypt around the 3rd Century CE in the Roman period. The complete disappearance of hieroglyphs around the same time was a result of anti-pagan measures taken by the Roman Empire. As hieroglyphics were associated with the pagan temples and ancient Egyptian culture (particularly magic and polytheistic rites), they died with the closure of the temples and outlawing of paganism. Indeed, the disappearance of the priesthoods left no one who understood this writing system which had been languishing for a few centuries. Greek also became a more common language overall with Demotic Egyptian being best represented in more rural areas which were more insulated from change. Although Greek seems to have dominated the urban metropoles, we do not really have satisfactory evidence on speaking patterns in Late Antiquity, and it is quite likely that Coptic was widely spoken in the cities. Rural isolation was far from complete, and the influences of foreign languages like Greek on Coptic is clear.
Arabic began to be spoken in the 7th Century, after Egypt's conquest by the Rashidun Caliphate but it did not come to replace Coptic for centuries after. The use of Arabic among non-Muslim Egyptian communities was motivated by the same factors that had driven the use of Greek. These reasons were the benefits that came from learning the language of the ruling elite, the dominant scholarly, court and administrative culture, and the new lingua franca. To be sure, the Ptolemies, Romans and Islamic rulers most certainly incentivised the use of their own languages but it was not a purely top-down imposition of language, and linguistic trends were not uniform across Egypt at any point in time. The persecution of Coptic Christians under the Mamluks (early-mid 13th to early 16th Century) greatly contributed to this decline. By the Ottoman conquest in 1517, Coptic had virtually disappeared from all but the most rural communities but as you can see this was neither sudden nor inexplicable.
It was ultimately centuries of internal instability, followed by periods of Greek and Roman rule, that started Egyptian was on its way out. Periods of rule by Arabic speaking dynasties certainly helped to facilitate the decline of Demotic Egyptian but it did not begin this trend. This is not unlike how it was in fact Christianity which replaced traditional Egyptian religious practice, not Islam as I sometimes see claimed on Reddit.
Ultimately there is not a singular all-encompassing answer as to why, we could just as easily ask why areas of Europe no longer speak Latin or Celtic and Gaulish languages.