As a general rule yes but there are situations where it can't be helped.
I guess it would also depend on the quality of the alternative to me killing them. Are there actually prisons that can hold people? Is there death penalties for people who are basically convicted of genocide?
Or am I stuck in "villain comes back anyway" Big 2 rule? Because if that's the case killing him won't do either, and I'd just rather not be a superhero at that point if I can only make such a small difference on the status quo no matter my actions.