For this I do not agree, and why "those" around will come near you when chanting is because that are they trying to find way to repent and when someone is chanting they come near to "listen"...Never heard of such things. In fact it should help to ward off the ghosts.
Well, up to believe

Agreei've never heard anything about the mantra warding off ghosts. the mantra is a reminder to the person chanting about the fundamentals of Buddhism.
in any case, when Buddhism first entered Southeast Asia, the mixing of the original teachings with local folk religions have caused alot of superstitions to develop around the religion.