Where does it say that venerable Moggallana got lost in space?
It is just a fable. It is not come from the ancient theravada pali cannon, both tipitaka and commentary. Because in Thailand we have many translated pali cannons, included those both, but no one found this fable in any cannon.

However, it maybe derived from SN Sagāthavagga, rohitassasutta, and KN Jātaka, javanahaṅsajātaka's commentary, which bodhisatta had helped the past life of moggallana.