I went through a similar mid-career burnout where I couldn't face jumping in with the 21 year old fresh grads to ramp up on yet another round of bloated frameworks. Shifting to management was the route out for me where I get to direct high-impact work and provide guard-rails that stop my reports from repeating the mistakes I made. They are all far better programmers than I ever was, and I've been doing it enough years now where it's profoundly satisfying to see my early hires thriving and far surpassing me professionally - while none of the code I wrote even 5 years ago exists any more (another existentially depressing thing about our profession).
If you love coding and want to keep working on green-field stuff, the freelance (contract, consulting, freelance, etc) route might be good for you. Change in this field is inevitable, and only going to get more rapid. You will need to either keep adapting, or find a way to incorporate or shift to something that has more ever-green skills.