it really depends on the circumstance. If the “bad guy” in this case is peaking around the corner pointing a gun in the direction he thinks you are, and you come up behind him from a different direction and shoot him, then its self defense. He’s in your home, he’s trying to get you in his sights, and has no intention of running. You are defending your property and your rights and killing the invader is justified. And really, it just comes down to the castle doctrine. Are you in your home? Is the person invading your home? Legitimate target. Period.
that said, someone breaking into a drug dealers house isn’t really surprising. Not sure why they are wasting any time with this case at all, except maybe to grandstand and try to make themselves more electable. So then you have three immoral people involved- dealer, invader, and prosecutor.
Because there’s s gun involved? I recently sat on a jury. Felon in possession of a firearm. The State’s (Oregon) case came down to whether or not the accused knew a handgun was in a “borrowed” car. Pretty sure it was just Kate Brown and Ellen Rosenblum trying to prosecute a gun. We acquitted. Six weeks later, the defendant is accused of second degree murder.