iThe United Nations Charter makes wars of aggression a crime. Various treaties make using civilians as a shield a war crime, using civilian buildings to launch attacks a war crime and fighting without uniforms a war crime, firing weapons that deliberately target civilians a war crime and therefore suicide bombing is also a war crime.
By all these laws and treaties, the mere election of Hamas as the government of Gaza was a declaration of a war of agression, since their charter makes the destruction of Israel a central plank. Their every action is a war crime.
I feel the IDF fails to make that point sufficiently in their public outreach. The IDF is confronted with an army of proven war criminals and has shown great restraint when they have the military might to wipe out all the population of Gaza. They go to great lengths to avoid civilians. It is impossible to be perfect at this when you face war criminals who actually want to see their own civilians killed in order to score propaganda points.
The IDF should call for the unncoditional surrender of all Hamas leadership amd like any criminals put a price on their head to encourage the Gazans to intervene and turn on the criminals within their midst then turn them in if they can.