The other option based off your logic is the Israelis can leave. Realistically they basically all lived somewhere else within two generations, be it Europe, US, Canada, etc. The only thing really tying them to the area is the fact they chose to move there for religious reasons. The Palestinians were born there and have lived there for centuries if not millennia. Why should they have to leave because someone else declared it their land that god gave them?
Do I have the right to evict both Israelis and Palestinians because I can trace my heritage to the Templars?
Considering most nations didn’t have established borders until very recently (last 100 years or so, those established borders being a disaster in many parts of the world, like the middle east where lines were just drawn) it can and has been done. We still have disputed borders all over the world, Hans island is a simple example of that.