Studies show that a sidearm as bear deterrent typically results in more injuries to the person than when bear spray is deployed.
Bear spray still undoubtedly the #1 option to halt a bear attack.
I guess, with a sidearm… what are the odds you can hit a target the size of the bottom side of a beer can coming at you at 65km/hr. My experience with bear attack is things are calm and then the bear is running at you. If you want to shoot it while things are calm… well then you aren’t really defending yourself. Trying to shoot the thing after it’s running at me is a near impossible task unless you have special training, let alone trying to rack a second round, or settle your aim for a second. Whereas bear spray doesn’t need to be accurate (tho wind is consideration), and close range deployment only. It shuts this down.