A fellow and his wife got attacked by a black bear, in their home, in Minnesota just today or yesterday, seems to me. Does that count?
It got shot inside the house. Good thing he had "one" handy. They were chewed up some though.
https://www.ammoland.com/2022/05/sig-9mm-and-knife-used-to-stop-bear-attack-in-rural-wi-home/As to bear attacks: We (Forest Service Officers) learned from an expert in the field (Gary Shelton), bears attack for basically 4 reasons.
Protection of territory, protection of cubs, protection of food source & predation(attack you as a potential food source).
We learned, that black bear attacks are more often predatory than grizzly bear attacks.
We also learned that 90% of all black bear attacks turn predatory as the attack ensues, no matter the initial cause of the attack.
With grizzlies, this does happen, but rarely & that if a sow grizzly with 2 year old cubs attacks, that attack may turn predatory as the cubs join in.