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.)