The definition of murder (including the “intentionally or knowingly causes the death of an individual”) is in Title 5, Chapter 19 (Criminal Homicide) and the exceptions to it are in Title 2, Chapter 9 (Justification Excluding Criminal Responsibility).
All the standard exceptions are there. You can use deadly force to protect yourself, others, your property, and other people’s property. (And plenty of other exceptions).
This just came down to whether or not it was reasonable for her to believe that she was in her own apartment.
If she reasonably believed that he had entered her dwelling with force, then she was justified in using deadly force.
So what you are telling me is that shooting someone with intent to kill is sometimes not murder, so defining "murder" as killing someone intentionally is not accurate.
Exactly my point.