Not all 'ghosts' from the dead of human. Some are spirits of
various domains and tertiaries.
If you attended some Dharma event, you'll notice the offering to
Naga and a small offering left outside the hall or place of
assembly.
Vajrayana has protective recitation that are very forceful towards
all (Dharma) disturbing activities, similarly in Mahayana and
Theravada. These are not aim at 'spirits of deceased human'.
Most Ven. Jing Kong in one of his teaching session mentioned he
encounter various disturbing 'activities' while he was in
Korea.
The logic is, human does not has the ability to break through the
Bardo or 中阴身 unless, while alive, this person has some form of
practices that makes him aware or having a strong bond with
protecting deities (can be of good or bad) that carries him to live
in another dimension (for a certain period only).
Accordingly, whenever after you did chanting (in any tradition),
you should dim your room light (not the shrine light) and leave
some food offering for any visiting 'friends'. They are drawn by
your chanting or the Dharma that is recited. If they found delight,
they will actually stay and becomes protecting deities - for the
Dharma activities. That is one reason why Vajrayana did not allow
non-filled Buddha statues.
That's why if you have a dedicated chanting room or chanting area,
you find it to be most peaceful for reflection and meditation.