Barrel length makes little difference in a Grizz attack. The position of the holster is more important than the barrel of your handgun. The bear attack will be fast and mostly unexpected. You will most likely be very close againsit the bears body in the last moments. Being able to accesss the gun high in front of your body will be your best advantage.
In the 4 cases where I knew the victims the gun was fired pressed agansit the bears body. The short barrel would have the advantage.