Why does the Torah enter the predicament that we discussed in the first place? Why not delete the whole passage of Bereshit 20. It seems quite superfluous: The Torah has a similar story in Bereshit 26, with the same king, Abimelech.
I suggest that it is kept for the following reason. The big chiddush of E, as opposed by J, is that in E the Akeidah ends differently, dramatically so. See this, for the background. In E, the Yitzchak of Bereshit 26 does not exist, and the story of Bereshit 20 is essential, for the chiddush. But why preserve this chiddush in the Torah, even for the writer of exotic Midrashim, even for the real researcher of the Torah?
Because Bereshit 15, a story of E as well as J, is not only for the physical seed of Abraham. Ayil Meshulash, Ez Meshuleshet, Eglah Meshuleshet, the promise of the land, would also apply if Yitzchak would have died. The Torah is truly not racist. Ayil Meshulash. et cetera, also apply to sparks of altogether different stock. They can be of the promised seed of Abraham, provided that they really listen to the truth. For this message the Torah is going out of its way.