That prohibition does not apply here, just as it does not apply to travelling to places where one’s parents, scholars, shaykhs, or brethren reside, nor to journeys undertaken for any other permissible worldly purpose.
As for the other newly-introduced practices, they comprise several matters. Among them are: performing ritual prayer at graves in any form, turning them into places of worship, and building mosques over them. The reports from the Prophet (peace and blessings be upon him) that forbid this and warn sternly against it are both numerous and recurrent.
With regard to building mosques upon graves, the vast majority of scholars from every school have explicitly prohibited it in obedience to those ḥadīths. Our own jurists, together with many of the followers of Mālik, al-Shāfiʿī and others, have declared it unlawful. Some scholars used the term “disliked” (makrūh); I do not know whether they meant thereby outright prohibition or merely a lesser censure.
There is, however, no doubt that it is categorically forbidden, for Muslim narrates in his Ṣaḥīḥ on the authority of Jundub ibn ʿAbd Allāh al-Bajalī who said:
“I heard the Prophet (may Allah bless him and grant him peace) five days before he passed away saying, ‘I disavow before Allah that I should take any one of you as an intimate friend (khalīl), for Allah has already taken me as an intimate friend just as He took Abraham as an intimate friend. Had I been permitted to take a close friend from among my community, I would have taken Abū Bakr as a close friend. Indeed, those who came before you used to turn the graves of their prophets into mosques. So do not turn graves into mosques; I am forbidding you from that.’” (1)(2)