Back in the day, people didn't use detergents to wash their hair. They used eggs... or coconut oil. Could it be that your scalp is reacting to the detergent in your shampoo? Most shampoos are too harsh - but they come in such a pretty package and smell so good.
Doesn't mean they are good for YOU. Everyone is different - what works for me may not work for you. Maybe you are washing your hair too often...
Seems the doctors don't know what is causing the problem... it may be something as simple as a Zinc deficiency. Zinc is a mineral that we need to heal our skin. it also heals acne. Worth a try, i think, don't you?
See a dermatologist. You need to determine what the sores are--bacterial, fungal, and parasitic infections are all options for sores, and there are autoimmune conditions that can cause issues too. An allergic reaction to things is also a possibility. It's best if you see someone who can tell the difference before throwing a truckload of treatments at it.
For me, I have horrible dandruff, and if I don't keep after it, instead of having a nice layer of skin on my head, I get this greasy yellow sludge/crud. If I scratch, it comes up orange or red, because it goes through to the blood supply (gross, I know). Then it really stings when washed, because I'm getting soap in cuts.
You might try getting some Lavender essential oil or a spray. You can spray it on the sores when they are present. My daughter has a very sensitive scalp and would get sores because she was sensitive to shampoos, so you might want to think about what you are using for hair care products when your scalp gets really bad. The lavender spray worked wonders for my daughter and would clear up any sores very quickly. Hope this helps.