The bug
If you use /tp on a lot of ghasts at once to the same place that is one block below the ground, they will glitch out and appear to go all over the place but if you go in survival mode they will shoot at you from the place you teleported them to.
Steps to reproduce
Spawn in a dozen or two ghasts in a flat world
/tp @e[type=ghast] ~ ~-1 ~
Switch to survival mode (maybe give your self Resistance V first?)
--> ❌ Notice the ghasts glitch out
The ghasts will eventually render in the correct location after between 2-10 seconds.
Can confirm in 1.19.1.