It is a heartbreaking situation, as being rehomed can exacerbate separation anxiety for a dog. Sometimes it is the only option. However, as long as a shelter or rescue is aware of the issue, they will do their best to find a foster or adopter who is able to both manage and address the separation anxiety.