That's really the core issue, and when the smoke clears from the current episode everyone will move on to other things, and we'll be having the same discussions in several years time when a new conflict inevitably emerged. Back in the 90s there was real hope and a path forward, but we seem further away than ever from that.
The entire problem seems intractable, without a clear "just do this" solution. I'm not seeing the will for a two-state solution among the population on either side, and Hamas is not like the IRA (or Arafat) who can be satisfied with a compromise, and neither are the extremist religious Jewish nutjobs for that matter.
https://www.washingtoninstitute.org/policy-analysis/new-real...
Anyway, occupying power can't displace occupied population to other country, for any reason, without violating Geneva Convention:
https://ihl-databases.icrc.org/en/ihl-treaties/gciv-1949/art...
Not that Isreal cares, but rest of the world does.