And what is a "civilian" anyway? Is someone who works in a gun factory a civilian or are they a legitimate target? What about a jeep factory? Or a factory which produces just some parts? What about the factory that provides steel? What about the lorry driver delivering the steel? Is someone who actively works to spread disinformation to justify something like the Russian invasion a civilian? Does it matter if they genuinely believe their own disinformation or if it's proven they know it's false?
In principle I agree with you as such and I think very few people disagree, but it's all pretty murky because most modern wars consist of much more than just soldiers going at each other. You need to look at the specifics of the situation in every single case.
One of my gripes about WWII in the Pacific Theatre, is some folks get very bothered by use of nuclear weapons, while ignoring or downplaying the use of incendiaries, which often killed far more people.
Intentionally trying to blow up non-combatants is bad - and there is no way to make it good. Its one thing if non-combatants are collateral damage (war is dirty), its another thing entirely if ones intention is to intentionally kill civilians.