Desensitization is a process of gradually exposing your dog to the things that make them anxious in a controlled environment.
Counterconditioning is a technique that involves pairing a trigger (e.g., you leaving the house) with something your dog likes (e.g., a treat).
Create a safe space for your dog where they can feel comfortable when you are not home. This could be a crate, a room, or even a corner of the living room.
Make sure your dog gets plenty of exercise before you leave the house. This will help them to burn off some energy and be less likely to get anxious.
If your dog starts to act anxious when you are leaving, do not give them attention. This will only reinforce their behavior.
Try to make departures and arrivals as calm as possible. Avoid giving your dog a big fuss when you leave or come home.
If you have tried the above tips and your dog is still struggling with separation anxiety, you may need to seek professional help from a certified behaviorist.