The Messenger of Allah ﷺ forbade that anything be written on a grave.
حدثنا عبد الله بن سعيد حدثنا حفص بن غياث عن ابن جريج عن سليمان بن موسى
نهى رسول الله ﷺ أن يكتب على القبر شيء
No references are available.
[Sahih] Reported by Abu Dawud, Funerals, chapter on building over the grave, hadith no. 3226, from the hadith of Hafs, with this wording. Tirmidhi also reported it, hadith no. 1052, from the hadith of Muhammad bin Rabia, from Ibn Jurayj, from Abu Zubayr, from Jabir, who said, the Messenger of Allah ﷺ forbade plastering graves, writing on them, building over them, and treading on them. He said, hasan sahih.