People are so convinced that if we're more cruel to criminals, they'll stop committing crimes, or if we're harsher to workers, we'll work harder, or if you're tough on border controls, immigrants will go away. It does not work and it cannot work.
killing nazis makes the ones you weren't able to kill more steadfast in their beliefs, (so it becomes harder to make them stop being nazis without killing them) and it makes it easier for them to convert others into becoming nazis (such as using it as 'proof' that they are oppressed)
I'd argue that cops existing also counts as "doing harm" to the people who would be cops. I remember a while back when I learned about how cops are trained (stuff that causes them to see everyone as a potential criminal who wants to kill them), I felt profoundly sad because as well as the harm that the cops cause as a result of this, it also just seems like a terrible way to live. I honestly feel sorry for cops