Possibly. But the law of war never said you couldn't risk or kill civilians. It just says you must minimize such "collateral damage" to the extent possible. "Possible" in this case meaning consistent with the military objective.
You answered your own question. Just as Israel has an...