You are including the graves inside the masjid, but graves should not be in there!
~c. 96 AH (c. 714-715 CE)
In about 96 AH, the Umayyad caliph al-Walid ibn Abd al-Malik ibn Marwan tore down the original Masjid al-Nabawi, the Prophet ﷺ's mosque in Madinah. He rebuilt it as a large, solid and richly decorated building. He more than doubled its size in all four directions. He even added 15 rows on the side facing the qibla. Because of this, the original pulpit (minbar) of the Prophet ﷺ now stands 15 rows behind the place where the imam leads the prayer.
The Prophet ﷺ had been buried in his own house, which was attached to the mosque but outside it. Al-Walid brought that house, the house of Aisha RA, and the grave inside it within the mosque. He also demolished the houses of the other Companions around it.
Some of the next generation of Muslims (the Tabi'un) objected. Sa'id ibn Jubayr said that graves should not be inside a mosque. Others protested that he was destroying the heritage that showed how simply the Prophet ﷺ and his wives, the Mothers of the Believers, had lived. Al-Walid went ahead regardless.
This is the only expansion in history that enlarged Masjid al-Nabawi in all four directions. It is also the reason the Prophet ﷺ's grave now lies within the mosque's walls, something that was objected to at the time.
You are including the graves inside the masjid, but graves should not be in there!