Grandma vs dad
When grandma comes to visit, the kids are very excited because grandma will shower them with gifts, yummy snacks and so on.
Grandma never asks them to do anything they don't like to do. Grandma will tolerate all sorts of inappropriate behaviour.
The kids love both dad and grandma but they display very different behaviours in front of them.
There are lots more self-control in their relationship with their dad. With dad, there are clear boundaries and they understand what they can and cannot do. With grandma it is a free-for-all. So, the kids act in a free-for-all fashion in front of her.
The behavior of the kids will mirror the energy of the person they are with. Dogs are the same way, too.
If your dog is really out of control around you, but is much better behaved around other people, please look at your energy and how you live with your dog - are you showering him with too much affection, giving him too much freedom, baby talking to him all the time, not following through with your commands, always giving your dog excuses for his bad behaviour?
If you are, your dog will probably view you as a free-for-all. They won't listen when you ask them to do something they don't like.
Let's go back to the grandma and dad example. If you hear some weird noises outside and you are worried someone maybe trying to break in, you will try to protect your grandma and ask her to stay inside while you go outside to check it out with your dad; you won't ask grandma to carry a rifle to go outside with you and ask your dad to hide in the basement, right?
Usually, dogs do not trust a grandma type owner when it comes to situations where they may feel threatened. They may even feel the need to guard this owner.
But if you are a dad type owner, they will feel more secured and safe around you and it is much easier to have them trust you and follow your lead.
It is important for dogs who are anxious, reactive, aggressive, hyperactive, fearful, nervous...to have someone in their life that they can totally trust and follow. Just love and affection is not enough to help these dogs.
Although l love grandma, but l do not act like a grandma in front of my dogs. I have found that with a balanced and well structured system that gives my dogs clear understanding of expectations, they are much more calm, relax, and content.
If you have problem with your dog, it is always a good idea to look into yourself and ask yourself if you are the grandma or the dad.
Hope this helps.