Confusing, isn't it? I am certainly NOT the person to give you any advice. I just want you to know you are not alone.
I had a shepherd mix about 10 years ago, lived with me & 2 other dogs, was a wonderful loving boy to us all.
But take him for a walk, and he became the "enforcer" of the pack. It was like he wanted nobody or nothing to come near any of us.
He did fine with visitors, and at the vets, it was just the walk. I tell you, I tried everything, and I never did get that under
control. He got better as he aged, but it never stopped.
I wish you greyt luck.