Unless you know for sure how your dog will react to a bear, you are far better off leaving the dog at home.

First of all, unless you leave food laying around camp, the risk of having problems with bears (I am discussing black bears here) is relatively small.

Second, taking an untested dog along in the hope that it would scare a bear away is risky to the dog and potentially annoying to anyone who might be camped nearby. A dog left outside as a camp guard can spend the whole night barking and fearful. And, if a bear does come along, remember that dog/bear encounters are almost always resolved in favor of the bear.

I have been hiking, backpacking and mountaineering for over 60 years and have never had a truly threatening encounter with a bear; black or grizzly; I have had a few adrenaline rushes though. I realize that not everyone has had that luxury. But, if an encounter does occur, I don't think having a dog around would improve things and could easily make the issue worse.
May I walk in beauty.