It's not at all an uncommon scenario to have to deal with in war, especially asymmetrical conflicts.
IMO, Israel stepped very clearly over the line, repeatedly, in how they handled it, but the parent post is a pretty reasonable summary of the considerations.
[flagged]