Flooding of tunnels is not a war crime as long as the water used is not toxic and the people in the tunnels have the option to surrender.
Flooding the tunnels with a poison gas or other toxic substance would be a war crime. Water certainly is not.
If I’m not mistaken, the Japaneses used caves in the Pacific islands to hide in. The cave entrances were blown up thus sealing off escape and leaving the Japanese soldiers to die due to lack of air or starvation. This was never considered a war crime.
Those were used by soldiers on an island they invaded, and the Japanese refused to surrender. The tunnels in Gaza have civilians seeking refuge in them.
For a WW2 reference, flooding tunnels in Gaza would be comparable to flooding the London Underground during the Blitz, killing civilians fleeing the bombing of the city above them.