Jesus and his parents returned home after the danger had passed.
While Jesus was an infant, Joseph was warned by God about the baby-killing government of Judea. He responded to God's message and took his family to Egypt. A few rich men had made generous private donations in honor of Baby Jesus so Joseph was able to get transportation and supplies for the journey and a safer lodging They escaped from the baby-killing ruler of Rome's Judaean territory, and legally took residence in Rome's Egyptian province where the government had a policy of allowing babies to live.
When word came that the baby-killing governor of Judea had died, Mary and Joseph brought Jesus back to their home in Nazareth. There were no illegal border crossings at any time. Throughout their multi-year round trip the Holy Family obeyed the religious and secular laws. At no time were they wandering, homeless, begging lawbreakers.
The fact that Jesus grew up in his family's hometown, Nazareth, further destroys the homeless and migrant Holy Family fable. Nazareth obviously was his home for about 25 years until he began his ministry at the age of 30. According to the most reliable source, the Holy Bible, his parents and Jesus went with their relatives and friends from Nazareth to Jerusalem every year to celebrate Passover.