Not in war they don't. If you have an operation that can severely injure 4,000 enemy soldiers but might harm 10-100 civilians, you are a d@mn fool if you don't do it.
That a very small number of civilians might be harmed, is not a rational reason to forebear killing or injuring 4,000 enemy soldiers.
How many civilians will die by letting all those soldiers live?
Your calculations are leaving out the deaths that would be caused by the terrorists. Those are much more likely than possible injuries or deaths caused to civilians caught in the attack on the terrorists.
That's the same argument the korrupt government used to force the COVID-1984 Jim Jones Jab on innocent people - and it turned out to be one massive lie.