That's the whole point of Scooby-Doo - it's about unmasking the villain, not killing them. The ghost is usually revealed to be a real person in disguise, and the gang uses their wits and Scooby Snacks to outsmart them.
In "Night of 100 Frights", the ghost with the yellow jacket is actually a human pretending to be a ghost. The gang figures out who it is and why they are doing it, and ultimately, they expose the culprit and put an end to their spooky scheme.
Remember, in Scooby-Doo, "Ruh-roh" is the sound of a mystery being solved, not a monster being defeated!