Neither participant in the Israel-Hamas conflict subscribes to that.
And I'm not really sure how you could expect the small resistance group to follow international humanitarian law when the big state they're fighting doesn't either? That seems absurd.
Many things are settled in international humanitarian law, thus far it hasn't stopped either side from ignoring it wholesale.