That's an interesting way to excuse virtually any war crime imaginable if Israel chooses to commit it. "It's Hamas' fault that Israel covered Gaza in anthrax spores, they're the reason Israel did it."
The right of civilians not to be arbitrarily deprived of life and the prohibitions against killing or maiming civilians are principles firmly enshrined in international humanitarian law, international human rights law and international jurisprudence. The prohibition of violence to civilians, including children, in particular murder, mutilation, cruel treatment and torture is a principle of customary international law, with universal applicability in all situations of armed conflict.
"They made us do it" is not a way around those laws.
All you're saying is that, to you, it's fine for the IDF to kill every single child in Gaza as long as someone has to pay the price for it in court later.
Under international humanitarian law and the Rome Statute, the death of civilians during an armed conflict, no matter how grave and regrettable, does not in itself constitute a war crime. International humanitarian law and the Rome Statute permit belligerents to carry out proportionate attacks against military objectives,[17] even when it is known that some civilian deaths or injuries will occur.
There is a very very big IF about it.
Hamas and their supporters attempted to genocide Israelis(and will do it again and again until they succeede). So yes, they made Israel go hunt the threat.
All you're saying is that, to you, it's fine for the IDF to kill every single child in Gaza as long as someone has to pay the price for it in court later.
To me, the IDF can do whatever it finds to be necessary to ensure the safety of the people of Israel. If hamas put children in their way, the IDF is not at fault.