They are going to have to drive them out of Gaza to Sinai.
And settle the Gaza.
There is no other answer short of killing them all.
Just a hunch of mine is, that eventually one side loses and the other side wins then there will be quiet at least for a while. This is how it usually ends up. Otherwise these attacks will be an ongoing never ending event, with some people or factions any negotiations are just an exercise in futility.