The most effective way to stop a deadly attack is to use deadly force, but the force is only justified in order to stop the attack, not to kill the attacker. It's only a coincidence of human physiology that the most effective means of stopping the attacker can so easily lead to the death of the attacker. The death of the attacker is never a justified goal apart from stopping the attack.
Your statement would be better worded, "... only because you need to stop someone ..."
You are right. If in shooting the attacker the attack is safely stopped, there is no need to “execute” the attacker. However, the moment the firearm is drawn from concealment, there should be no hesitation to shoot and the shoot placement should not be a wounding shot nor a warning shot, but a shot that will immediately stop the attack, which is usually a shot to an area that would normally be fatal.