First, I'm talking primarily about diet and fitness advice which pertain to any diet/fitness responsive condition or simply on healthy living as its own aim.
Second, while I think it'd be terrific if all physicians continually walked their talks, this isn't a reasonable expectation. What is however reasonable, at least in my opinion, is that a physician providing lifestyle advice has spent at least some time following their own advice (barring of course any physical or medical limitations that might preclude same).
Living the whys, wherefores, real-life challenges, and logistics, of their own lifestyle advice provides physicians with insights and empathy that in turn will help in their understandings of their patients' struggles and barriers. That understanding is likely to improve the counselling and support those physicians provide.
Whether it's keeping a food diary, following a particular diet, cooking the majority of meals from fresh whole ingredients, exercising a particular amount each week or day, mindfully meditating, etc - spending a real amount of time doing so (my non-evidence based suggestion would be for a month at least) will make you a better clinician.
[And to be clear, as there were those online who wanted to extrapolate my statement into one that suggested physicians must themselves all live incredibly healthful lives and maintain certain weights - that's definitely not what I'm saying, nor of course does weight provide real insight into the health of a person's lifestyle (as plenty of people with obesity live healthy lives, and plenty of people without don't).]