He might be going through some emotional disorders. Just like human emotions, dogs have feelings too. So, if your dog isolates itself and stays away from people or moves to a different room with people around, there could be many leading reasons for it.  Notice the behavior for a couple of days and try to figure out what is bothering your furry friend. If it becomes a habit, it might be due to an underlying cause, such as anxiety, sickness, fear, or simply because it is bored of its activities.  Attend to it immediately and try to bond and make it feel at ease. If the dog still acts aloof, you need to discuss the concern with a vet and see what they say about the behavior and any possible causes and remedies.