How old is he? Has there been any changes to his enclosure?
Some UVB lights cause them to keep their eyes closed and become lethargic. Can you tell me what UVb light you are using? Name and type? (coil, compact, tube or mvb)
All UVB lights need changing. They stop emitting UVB. If it is a tube light, it needed changing after 6 months of use. The best tube lights to get are the ReptiSUN 10 linear bulbs. The ReptiGLO ones have been known to cause health issues. That is why I asked which you are using.
I couldn't see where you live. Has he brumated this year? Is it that time of year where you are? Is he about to shed maybe? Just trying to think of some other things it could be.
Laying in the sun isn't such a bad thing. Good for UVb exposure.
Some adult dragons go without food for a few days at times. But I do hope that he starts eating soon for you. Have you tried using different greens and veggies? Maybe something he hasn't eaten before but may like? Trying a different feeder such as butterworms or hornworms?
You can also make a slurry out of blended greens and veggies (or use veggie babyfood) and try to drip some on his nose. He may lick it off and will get some nutrients that way.