You don't seem aware that Japan armed and trained it's population (Kokumin Giyū Sentōtai), men and women including kids, and mandated them to attack invaders. Another example of deranged theocratic dictatorship. The US doing a land invasion would have almost certainly resulted in far more "civilian" deaths.
Also the Geneva conventions don't apply when fighting an enemy who doesn't abide by them. Its incredibly annoying to fight an enemy that has no problem using ambulances as troop and weapon transports. Or an enemy that refuses to issue uniforms to it's fighters. This isn't even necessarily referring to Israel and Hamas, it was rampant with al qaeda and ISIS.
As for China invading the US? Well Ukraine has managed to keep it above board. It's only these shit head theocratic lunatics that have no problem shoveling civilians into the fire to keep their ass in power. Maybe you aren't aware, but Hamas consoles it's civilians by telling them they are dying for God. Just like Japan trained it's civilians during WWII to die for God (who happened to be the emperor.)
Sure, the easiest way out of your dilemma is to just declare everyone killed to not be a civilian, and define every enemy to be out of scope of any restraint.
By that metric there are never any dead civilians and no rules apply.
Kinda sounds as if you are looking for excuses to make these rules you yourself brought up not apply to any real situation.
I really, really wanted to avoid making fun of of your "gifted brain power".
Your argument is so lazy, I am starting to doubt your godlike intellect.