it belongs to the category of what the Sacred Law has forbidden, as has already been explained.
Supplication after Greeting the Prophet ﷺ at His Grave
The manuals of pilgrimage state that after greeting the Prophet ﷺ and his two Companions and invoking blessings and peace upon him, one should make supplication. Imām Aḥmad and others report that the visitor is to face the qiblah and place the blessed Chamber on his left so as not to turn his back to it. This is done after offering the greeting and prayers upon him; thereafter he supplicates for himself. They also said that while giving the salām and invoking blessings one faces the Prophet’s noble countenance—may my father and mother be sacrificed for him—but when one wishes to supplicate, one puts the Chamber to one’s left, faces the qiblah, and then prays. Such etiquette was adopted to avoid any impropriety, for supplication at the grave is not disliked in itself; on the contrary, it is encouraged, as the Sunnah has indicated implicitly and incidentally above. What is discouraged is to make a special trip to the grave for the sole purpose of supplicating there.
The Mālikī jurists said likewise: one approaches the grave, greets the Prophet ﷺ, and then, facing the qiblah, supplicates, thereby turning his back to the grave. Others held that he should not turn his back toward it. Their difference lies only in whether turning away from the grave is permissible. If, however, he stands with the Chamber on his left, the objection disappears by consensus, for he will be standing in the Rawḍah or just in front of it.
It is likely that the scholars derived this etiquette from the prohibition against praying toward graves, a ban established by the Prophet ﷺ, as mentioned earlier. Because he forbade taking a grave as a place of prayer or as one’s qiblah, they likewise ruled that one should not deliberately orient one’s supplication toward it, just as one must not perform prayer in its direction.