The Prophet ﷺ, when traveling, would say, "O Allah, I seek refuge in You from the hardship of travel, the gloom of return, and from finding distress in family and property upon coming back. O Allah, You are the Companion on the journey and the Guardian over the family. O Allah, fold up the earth for us and make the journey easy upon us."
حدثنا يحيى عن ابن عجلان قال أخبرني سعيد
عن النبي ﷺ أنه كان إذا سافر قال اللهم إني أعوذ بك من وعثاء السفر وكآبة المنقلب وسوء المنظر في الأهل والمال اللهم أنت الصاحب في السفر والخليفة في الأهل اللهم اطو لنا الأرض وهون علينا السفر
Its isnad is sahih. Muslim narrated it, 2/979, no. 1343, in the book of Hajj, what one says when setting out on a journey for Hajj. Nasai narrated it, 8/272, no. 5498, in the book of seeking refuge, seeking refuge from reverting after progressing. And Ibn Majah narrated it, 2/1279, no. 3888, in the book of supplication, what a man supplicates when he travels.