My dog used to scratch and lick herself raw too. Turns out she was allergic to our Grass (not a good thing for a dog to be allergic too!). The vet told us to give her the dye free Benedryl.
That seemed to help. We moved a couple of years ago and our yard is a different kind of grass and she hasn’t had a problem since. I was told that dogs are primarila allergic to 3 things dust mites in the house, grass and ???