Some Canadian told me a semiautomatic shotgun with double ought can deflect a bear attack
Having shot bears with double 00 buck, yes it well work.
But having shot bears with rifles, shotguns and different pistol calibers.
I have found solid projectiles work better.
Buckshot lack pentation past 15 yards.
Slug.