Pre-Islamic instances of mosques built over graves:
The following list is merely indicative and should not be treated as exhaustive:
1. Prophet Dawood (a.s.) in Quds, Israel
2. Prophet Ibrahim (a.s.) in Hebron, Israel
3. Prophet Is’haaq (a.s.) in Hebron
4. Prophet Yaqoob (a.s.) in Hebron
5. Prophet Yusuf (a.s.) in Hebron
All these graves were elevated structures of stones and remained in this condition even after the spread of Islam in Quds. (Kashf al-Irteyaab, pg 306)
Even Ibn Taimiyyah admits that the structure over Prophet Ibrahim’s (a.s.) grave existed when Islam reached Hebron and in the very presence of companions, none of whom raised any objection. Only thing is the door to the mausoleum (of Prophet Ibrahim (a.s.)) remained closed till 400 AH.
(Majma’ al-Fataawaa of Ibn Taimiyyah vol 27 pg 141)
(Majma’ al-Fataawaa of Ibn Taimiyyah vol 27 pg 141)