Intent matters, and disregarding it disables your ability to determine right from wrong. If someone attacks you and you kill them by acting in self defense, you absolutely would hope that the people judging you for your actions would consider your intent. You would probably feel you don't deserve to spend a moment in handcuffs, let alone night in jail, let alone go through a criminal trial, let alone be sentenced, even if it is negligible in comparison to a murderer.
Right and wrong are kind of irrelevant in international politics. When there are no enforceable laws, no shared values, and no expectations of justice, justifications don't really matter. Consequences and reciprocity become more important. If you do something because you think it's justified, others will do similar things if they think their actions are justified. It doesn't matter what the others think about the justifications of your actions or what you think about the justifications of their actions.
Political power comes from what populations think. At first, the US thought there would be clear support for their position given Hamas’s actions, and acted accordingly. That has not really been the case, so they are moderating their position. Some of that is a result of large numbers of people thinking things like “Scale is the most important factor when talking about the harm done. A dead person is dead, regardless of if it was murder or manslaughter.”