That is not a valid solution
Both Egypt and Israel shed the “Gaza Strip”
The current Hamas effort is wrought by Iran to end the Arab participation in the Abram Accord/Negev Summit coalition of the Arabs that matter and israel.
The Abrams Accord effectively ends the Arab support of Palestine and is a mortal threat to Iran
There is no where the Palestinians can go. They are contained and that is the best solution all the world diplomacy can muster