I'm not sure how often this happens but I was diagnosed with ME a decade ago. I tried everything to cure myself, threw good money after bad. Got worse year on year, couldn't understand it as have given up pretty much everything. Stopped having a social life, stopped working, stopped hobbies, stopped everything. I followed all the rules, rested, ate a clean diet, had all different types of therapy because people kept telling me I was depressed (I wasn't) my relationship fell apart because he resented me for being ill despite "looking fine". People thought I was making it all up for attention, it was hell.
I did research when I was able, tried to figure out what caused it so I knew how to fix it.
I kept going back to the GP, pushing for more tests because I couldn't understand how something so invisible could ruin my life to such an extent, I mean there's not even a blood test for it. He said I had health anxiety.
Finally, after years and years of pleading for tests, they discovered I actually have MS, Ankylosing Spondylitis and a heart condition. No amount of positive thinking, counselling and pacing was going to fix it.
Sometimes ME is diagnosed when they've got tired of looking for anything else.