In my friend's realm I flew my Happy Ghast Up about 500 blocks up and jumped off, I eventually found it about 150 blocks away from where I got off even though it should only fly 64 blocks away. The same thing happened to my friend’s Happy Ghast, he jumped off about 1,000 blocks up and it flew about 200 blocks away.
They aren't going to far away. They are just idling in the sky and as they are very high up they are trying to path-find back to their spawn point that either they were spawned in or grew from a ghastling to a happy ghast. But its too high up so they don’t know where to go