Au contraire — pyramid building continued right on through pharaonic Egypt, ending during the New Kingdom. The Middle Kingdom pyramids reverted to mudbrick, as the pre-4th mastabas had been constructed, with stone sarcophagi. During the New Kingdom pyramid building was much smaller, both brick and stone. Eventually, beginning with the 25th dynasty (Nubian dynasty of Egypt) the practice moved upriver, where it continued in burial practices until the 4th c AD.
I did not know that. Thanks for the correction