In fact, most dogs have such a strong instinct to protect their loved ones that no amount of socialization will diminish it.
On the other hand, a protective instinct can be so strong that it causes unwanted aggression toward people outside the family.
Some breeds make better guard dogs than others.