Egh, this comparison seems a bit iffy…
I sort of agree, but that’s why I added the bit afterwards about desperate measures - Gazans are in exactly such a situation, fighting a foe that openly declares its intention to exterminate them. In such circumstances, a lot of things are justifiable that otherwise wouldn’t be. The various rules of war can be useful in “normal” conflicts where a negotiated settlement can be reached, and following those rules can limit escalation and thus minimize damage to all parties involved, but if one side seeks to completely slaughter the other, that framework kind of falls apart - things have already escalated to one of the highest levels possible.
Poland was, until the Nazi invasion, not fighting a genocidal foe, and in fact had been the aggressor in their war against the Soviets, had participated in the partition of Czechoslovakia, and had some pretty wild expansionist ideas. So their case is rather different.