Bereshit / Genesis 39:12 · Drash
וַתִּתְפְּשֵׂהוּ בְּבִגְדוֹ לֵאמֹר שִׁכְבָה עִמִּי וַיַּעֲזֹב בִּגְדוֹ בְּיָדָהּ וַיָּנָס וַיֵּצֵא הַחוּצָה׃
And she caught him by his garment, saying: "Lie with me." And he left his garment in her hand, and fled, and went outside.
Drash דְּרָשׁ
In the merit of the fathers
If Yosef already "fled", why does the Torah add "and went outside"? The midrash hears the words said to Avraham: "and He brought him outside". Yosef was saved not by his own strength alone.
Bereshit Rabbah: Yosef leapt free in the merit of the fathers, as of Avraham "and He brought him outside". In the merit of Yosef's bones and his flight the sea parted. Lekach Tov: the garment opened at the front, and she seized him from behind, so he stood with his back to her. And he was saved in the merit of Avraham.
How Bereshit Rabbah and Midrash Lekach Tov explain it
Bereshit Rabbah And she seized him by his garment, and so on, and went outside
He leapt free in the merit of the fathers, as it is said: "and He brought him outside" (Bereshit / Genesis 15:5). Shimon of Katron said: in the merit of Yosef's bones the sea was split for Israel, as it says: "the sea saw and fled" (Tehillim / Psalms 114:3), in the merit of "and he left his garment in her hand and fled". "And she called to the men of her house" (39:14) — she put him in everyone's mouth. "And she laid his garment beside her" (39:16) — Rabbi Ammi said: she was embracing it and kissing it.
Midrash Lekach Tov And he left his garment in her hand
From here, that his garment opened at the front, as we said of the striped tunic: it is like riders' clothing. And she seized him from behind, and he undid the loops at the front from the hooks.
And he left his garment in her hand.
For had he faced Potiphar's wife, the Torah would not say "and she seized him" and "and he left his garment in her hand".
And he fled and went outside.
Since it says "and he fled", why does it say "and went outside"? He was saved in the merit of Avraham our father, as it says: "and He brought him outside" (Bereshit / Genesis 15:5).
Takeaway
The same word "outside" (הַחוּצָה) stands in the story of Avraham's stars: "and He brought him outside" (Bereshit / Genesis 15:5). The midrash links the two places by the shared word.
Rabbi Ammi on the master's wife: she embraced and kissed Yosef's garment. The midrash shows her passion, not only her cunning.
Lekach Tov is the midrash of Rabbi Tuvia ben Eliezer (11th century), gathered from earlier midrashim.