History has shown to win a war, you need to either eliminate the enemy or eliminate enough of the enemy they give up and surrender.
Hamas is not going to surrender, Israel might has go ahead and annihilate them or at the very least make sure they are no longer to pose a threat to them from Gaza, anything less and it ensures they will come back to fight another day.
Hamas actually declared victory! There may be a little truth the that, at least to their way of thinking. If there is only one Hamas terrorist left alive, he would still stand in the village square and declare victory. So, my way of thinking...KILL EVERY SINGLE ONE OF THEM. Leave no one behind to utter a word.
Sun Tzu says the true objective in war is the elimination of the enemy’s willingness to fight you.
This can be done in three ways, either
Turn them into friends and allies
Make them terrified of the idea of pissing you off again, or
Deuteronomy 20:16