Parashas Shemos
וַיֵּ֨לֶךְ מֹשֶׁ֜ה וַיָּ֣שׇׁב ׀ אֶל־יֶ֣תֶר חֹֽתְנ֗וֹ וַיֹּ֤אמֶר לוֹ֙ אֵ֣לְכָה נָּ֗א וְאָשׁ֙וּבָה֙ אֶל־אַחַ֣י אֲשֶׁר־בְּמִצְרַ֔יִם וְאֶרְאֶ֖ה הַעוֹדָ֣ם חַיִּ֑ים וַיֹּ֧אמֶר יִתְר֛וֹ לְמֹשֶׁ֖ה לֵ֥ךְ לְשָׁלֽוֹם׃
Moses went back to his father-in-law JetherfJether I.e., Jethro. and said to him, “Let me go back to my kinsfolk in Egypt and see how they are faring.”ghow they are faring Lit. “whether they are still alive.” And Jethro said to Moses, “Go in peace.”
Torah Temimah points to R’ Avin HaLevi — Berachos 64a (verified).
לך לשלום — א״ר אבין הלוי: הנפטר מחבירו אל יאמר לו לך בשלום אלא לך לשלום, שהרי יתרו שאמר למשה לך לשלום עלה והצליח.
English: “Go to peace (lech leshalom)” — R’ Avin HaLevi said: One who parts from his fellow should not say “go in peace (beshalom)” but “go to peace (leshalom),” for Yisro, who said to Moshe “go to peace,” ascended and succeeded.
Custom
Chazal prefer the parting formula “lech leshalom” over “lech beshalom,” following Yisro’s wording.