This is a very common challenge that many dog owners have to contend with.
Here are my thoughts on this issue and I apologise if some of my opinions are not shared.
In my opinion, a dog can only have anxiety when separated from his owner if the dog is not accustomed to certain routines from a very young age.
As a young puppy there should be “alone times” (at night time downstairs in a crate or a basket) and during the day up to a maximum of 4 hours at any one time.
If these two simple things are not routinely practised then the dog will become very needy of constant company.
It is important to demonstrate to a puppy that although alone at night and through the day at times, you will always return and this will be the “normal” routine.
In my experience, separation anxiety is more common with dogs who’s owners are retired and they have become their life partner” or with dogs with one member of the family with them constantly.
The dog has simply not learned that it’s ok to be left and ” the pack leader” will return.
Once the pattern of neediness and separation anxiety has established itself, it is harder to address than ” starting the way you mean to go on”
To break the pattern later on in life becomes harder the older the dog becomes. It’s like trying to reprogram a bad habit.
Quite often an Animal Behaviourist must be sought for advise as this behaviour can disrupt the lives of everyone when any change of routine occurs such as illness, holidays or in fact the rehoming of the dog.