I agree entirely with John; but amplifying some points. Motion lights and dog (s).
Motion lights around the outside especially doors will solve a lot of issues before they happen. Then, being met by a yapper at the door or hearing it will make additional issues go away in search of softer targets.
Both of these are working on the main underlying factor here: her perception of her personal security. These two items will make her feel more secure and each have value added in reality.
Security in depth is what you improve, think “layers” or rings of defense, LTC.
Guns are the last level. A 10/22 or a Marlin tube-fed (ultra reliable) punch well above their weight factor. John pointed out the “barricade” tactic and is exactly correct. It’s a Position of Dominance (POD) where you have to advance through a chokepoint and I have tactical advantage over you. If you want to wade through my “fatal funnel” while absorbing 22LR, come on. I would say the bedroom is a great choice with the shower as a final stand with handgun. Most bathroom are even smaller with tile surfaces.
Again, John is spot on with the “prop the gun on the mattress” answer. If she’s shooting holes through the door into their hips and belly, they’ll go away.
Additionally, tell her to dial 911 and lay the phone down. Don’t hang up, just lay it down. Dispatchers will want to talk to you, but thats too much distraction; help will be coming loudly once they hear her call and situation.
And, finally, someone mentioned my “farm gun” choice, the M1 carbine. It might be a little much for her, but consider it if she wants an upgrade.