Aisha said, "The Prophet ﷺ in his fatal illness said, 'Allah cursed the Jews and the Christians because they took the graves of their Prophets as places for praying."' Aisha added, "Had it not been for that, the grave of the Prophet ﷺ would have been made prominent but I am afraid it might be taken (as a) place for praying.
عَنِ النَّبِيِّ ﷺ قَالَ فِي مَرَضِهِ الَّذِي مَاتَ فِيهِ لَعَنَ اللَّهُ الْيَهُودَ وَالنَّصَارَى اتَّخَذُوا قُبُورَ أَنْبِيَائِهِمْ مَسْجِدًا قَالَتْ وَلَوْلاَ ذَلِكَ لأَبْرَزُوا قَبْرَهُ غَيْرَ أَنِّي أَخْشَى أَنْ يُتَّخَذَ مَسْجِدًا