Begin training your German Shepherd puppy to be comfortable being alone from a young age. Gradually increase the time you leave them alone, starting with just a few minutes and slowly building up.
Make sure your German Shepherd gets sufficient physical and mental exercise before you leave. A tired dog is less likely to get anxious and destructive when left alone.
Playing calming music or leaving on the TV can help soothe your dog while you're gone. Pheromone diffusers or sprays designed to reduce anxiety can also be helpful
Crate training can give your German Shepherd a safe, comfortable space to relax in when you're not home.
Get your dog used to the things you do before leaving, like putting on your shoes or grabbing your keys, by doing these actions without actually leaving. Reward calm behavior with treats and praise.
Having a canine companion can help alleviate separation anxiety for some German Shepherds.
However, this is not a solution for all dogs and you need to ensure you have the time and resources to properly care for two dogs.