I wish that happened a lot more. Getting shot should be an occupational hazard for a burglar. If you’re not armed, you’re not helping. Get trained, be safe, and be dangerous to bad guys.
Now, I can tell you that a dog (of any size, it’s not for biting a bad guy, though that may be a happy coincidence) is the best defense. A warned homeowner is a dangerous homeowner. Don’t be a helpless and hapless victim. Cowboy up and defend yourself!
Now I fully understand that there are conditions that may argue against being armed, but those are few. Age and infirmity count (which is why old people and disabled people are so regularly made victims). Having small kids is an issue that can almost for sure be worked around, if you are motivated. And you should be training your kids in firearms from an early age, so there’s no attractive mystique there. Of course, that means that you yourself know what you’re doing and can be safe.