(Genesis 15:16) One who takes leave of the dead should not say to him, "Go to peace," but rather "Go in peace," as it is said, "and you shall go to your fathers in peace" (Genesis 15:15). One who takes leave of a living companion should not say to him, "Go in peace," but rather "Go to peace," for behold, David said to Absalom, "Go in peace" (2 Samuel 15:9), and he went and was hanged; Jethro said to Moses, "Go to peace" (Exodus 4:18), and he went and prospered.
Parting Words for the Living and for the Dead
Yalkut Shimoni on Torah 77:15
(בראשית טו טז) הַנִּפְטָר מִן הַמֵּת אַל יֹאמַר לוֹ לֵךְ לְשָׁלוֹם, אֶלָּא לֵךְ בְּשָׁלוֹם, שֶׁנֶּאֱמַר וְאַתָּה תָּבֹא אֶל אֲבֹתֶיךָ בְּשָׁלוֹם. הַנִּפְטָר מֵחֲבֵרוֹ אַל יֹאמַר לוֹ לֵךְ בְּשָׁלוֹם, אֶלָּא לֵךְ לְשָׁלוֹם, שֶׁהֲרֵי דָּוִד אָמַר לְאַבְשָׁלוֹם (שמואל ב טו, ט) "לֵךְ בְּשָׁלוֹם", וְהָלַךְ וְנִתְלָה, יִתְרוֹ אָמַר לְמֹשֶׁה (שמות יד, ח) "לֵךְ לְשָׁלוֹם", הָלַךְ וְהִצְלִיחַ.