Thank you for that information. It does sound like you have a dog that has become more fearful as these are the typical acts of a fearful /anxious dog.
They usually do not eat when they are left with someone else until they see a routine and they will nip or give a warning growl when something they fear comes next to them, especially without warning.
Dogs will act out at people or dogs moving past home to keep them away from them. They do not realize that the people will walk on by anyway, they think their acting out is what made who they feared not come near them. This also applies to the street, the more aggressive they act, the more they are successful in keeping what they fear away from them.
This can be inherent and if so, it will get worse between ages 1 and 2 years, then get progressively worse as they age.
Fear is an emotion, this kicks in the dog's instinct to protect itself..
Many people feel their dog acts out because it is protecting the owner, but in reality, the dog does not want someone in their space. Usually the dog is by the owner's side, so this makes it look like the dog does not want others near their human.
Dogs with fear need to be warned what is expected of them or what the human wants them to do. For instance, if the dog ia on the couch, and a human wants to sit on the couch, just sitting down may get the dog to bite them. The dog needs to be told to get off the couch, before someone sits.
Even if one has been sitting on the couch and the dog has been laying on the couch, when the person gets up or tries to pet them, that is movement getting into their space and that can trigger a nip.
It is best to do what you have been doing at home, getting the dog used to it's own bed and when you have company, they should ignore the dog totally if the dog has not been put in another room or crated.
There are things humans do that challenge a dog, reaching out to, walking toward, looking at, and talking to. These are challenges to any dog, but if the temperament is stable happy go lucky, then there are no issues. But if a dog has fear, then instinct will kick in.
They don't think ahead like we do. An example is that you are talking to a friend, the dog is near you, and the friend drops their keys. You know the next move is going to be that your friend will bend down and pick up their keys. The dog however, see this as that person leaning over them and getting in their space and then they will act on that.