In my experience this is actually rare. I've heard many similar stories to mine here from friends and family, but briefly, my own recent experience with this kind of thing:
I saw four doctors across two states trying to resolve a certain medical condition, which happens to be very common, has very negative effects, and has low recovery rates.
They prescribed a couple different medications, and mentioned that the disorder is "associated with" a list of a bunch of things related to lifestyle and diet. (These items were never brought up again by any doctor after their initial brief mention: it was a kind of "going through the motions" with each doctor—part of the obligatory informative synopsis of the disorder.)
The medications did practically nothing, and experimenting with briefly removing different items on the list from my life did practically nothing. Meanwhile my life was severely negatively impacted by this for ~4 years.
Eventually I decide to "get healthier" in a general way with an improved diet, insistence on regularly getting sufficient sleep, reduced alcohol consumption, and regular strength training.
A few months later the condition was at about 50%, and now it's at a point where I'm barely bothered by it.
I'm also a Type 1 diabetic and ran into a similar thing there: the recommendations given to me by doctors were incompatible with the blood sugar ranges they described as desirable. So I did my own research and discovered that basically everyone who had really good numbers was doing massive carbohydrate reduction in addition to taking insulin.
What it came down to in both cases: doctors will not prescribe lifestyle changes. They may mention them, but their core solution is likely to be a medication + tweaking dosage—even if this is by comparison far less useful.
I do think there's a legitimate reason, though: most people are simply not willing to make these kind of lifestyle changes. However, for those who are willing to do it, there's a good chance they'll lack the info on how effective it can be, because it's not what their doctor is going to emphasize.
(I'd urge anyone who thinks my cases may be uncommon to try this: if you know someone who resolved a medical condition by general lifestyle improvements like diet, sleep, exercise etc.—see if they made the changes because a doctor recommended it or if the motivation come from somewhere else.)