I rely more on bear spray than anything else. But I also own a Glock 20 with Buffalo Bore 10mm 210gr (1200fps/703ft.lbs) that I can optionally carry. I figure the spray is the first line of defense. If I have both with me, and have the time, draw both. Deploy the spray and if pursuit continues, unload. But if the bear has had any taste of blood, consider the spray completely ineffective. If it was a defensive attack, either shoot or play dead. If it was a predatory attack, fight back anyway you can.

Interesting read: https://www.adfg.alaska.gov/index.cfm?adfg=hunting.firearms