I personally would rather have a can of bear spray ready than about any firearm. Too many stories of "guy shot a griz in the heart 3 times with his 44 mag and got kilt, bear got 250 yds away before he died".
Don't think there's many if any) documented fatalities from bears once spray was activated.
Trying a heart shot on a bear in defense with any pistol is, IMHO, nuts. Head on the face. Side ear hole. Standing soft under of jaw.
A guy I knew at my work was a near bear victim. While deer hunting in Colorado when a Griz charged him then stood up. All he had for hunting white tail was a 30-30. It would not penetrate the chest and literally bounced of the sternum. With the bear near on him and him on his back the round that put a stop to the bear was jaw up to brain pan. No spray back then.
Unless you are specifically hunting bear and are equipped for it the best defense is avoidance.