You’ve identified the real issue & separated the incontrovertible from the inconsistent. By all means ask if Hamas’s actions were technically illegal but the context is important and mitigating factors should be considered. It’s quite clear that any mitigation on behalf of Israel is untenable.