2. The second solution which allows your dog to manage their anxiety on their own is crate training. Give your dog a safe, secure and positive place with the crate. When your dog feels unsafe or insecure they will automatically go to their safe space which will become the crate. Also work on some sound desensitization.
Play thunder sounds just at a normal level and play with your dog, give the dog treats. If the dog is comfortable turn up the volume a bit and repeat, continue this making it louder and louder remembering it’ll take time and to take it slow, if your dog seems worried by the sounds then turn it down a bit and take a step back.
When you feel your dog is comfortable enough start to take the dog outside during a storm and play with the dog, make sure you stay upbeat and excited and make it the funnest most exciting thing ever!
Crate training can also help with separation anxiety. Change your dogs mindset about these things rather than masking it with medications or other techniques and you’ll have a happier and more secure dog in the long run.
Good luck!