When Hamas uses hospitals for military purposes (or any purpose "harmful to their enemy" [other than solely medical care of injured Hamas combatants]), those hospitals lose their protected status otherwise provided by the Geneva Convention.
I don't like the prospect of hospitals being attacked, but if Hamas houses combatants or arms inside a hospital, attacking Hamas therein does not appear to be a war crime, provided Israel has issued a warning and allowed a reasonable time for Hamas to vacate the hospital.
The Geneva Convention does not provide "One Weird Trick to Avoid Combatants Being Attacked"
The Geneva Convention does not provide carveouts to particularly angry personnel. You can try to define fake conditions to justify it but the hearing hasn't happened so you're just speculating.
And you know what? You can document the torture, sexual assault and murder of innocent prisoners without getting a proper investigation from the ICC. Many US citizens will remember that from Abu Ghraib! Lord only knows how much the CIA is shielding Israel from the fallout of SAVAK. You might as well drop the moralizing pretenses and admit that you don't think a fair trial would be desirable.
I don't like the prospect of hospitals being attacked, but if Hamas houses combatants or arms inside a hospital, attacking Hamas therein does not appear to be a war crime, provided Israel has issued a warning and allowed a reasonable time for Hamas to vacate the hospital.
The Geneva Convention does not provide "One Weird Trick to Avoid Combatants Being Attacked"