Hakeemul Ummat Hazrat Mawlana Ashraf Ali Thanawi ra said commenting on the verse 84 of surah Tawbah (:nor stand by his grave), said;
“This standing at the grave is beneficial for the deceased…….. This benefit of being present at the grave and making dua, etc. is in addition to the benefit made by dua when not being present there.”
Masail us Sulook min Kalam Malik ul Mulook, page 237
Please take note that for us visiting the graves is for making esal e thawab, remembrance of death and this benefit. It should not be for any innovative practices.
As far as the issue of benefiting from the deceased is concerned, it is true, but only when certain specific criteria are met. Most important of them is that the person in attendance and dead both must be sahib e nisbet. Hazrat Hakeemul Ummat ra’s teachings are very clear regarding this.