That seems to be the main issue. I tried sysadmin for a while, it was more varied than a swe role and I enjoyed it more, but after a while it still became "boring" and mentally unbearable. I like writing software for myself however.
I've had this issue since school. And as soon as a subject is done with, and the pressure of "have to" is relieved, I actually start to give a shit about it. By then however, I had already gotten a bad grade on the exam.
I'm probably some kind of neurodivergent. Not sure what exactly is "wrong" with me, although I've had plenty of "professional" help.
One idea, may not be your cup of tea though... I don't know your situation as far as family.
Have you considered joining the military? It provides structure, a million different career paths, travel, comradery and physical fitness. Plus a pension if you stay in for 20 years. On top of that there are multiple branches to choose from depending on your wants.
If I had reached burn out in my twenties, I would have joined the military.
I'm like you: I have very hard time working on something someone tell me to do, yet I can spend hours working on my own projects without any issue. Of course this led to pretty big issues like failing my PhD and having to go back in my country. Then I quitted my first real job after 4 months because I was feeling I wasn't pay enough and the conditions weren't to my liking, and finally found a full remote one which pays quite a bit more.
My advice would be to either find a job in which the conditions aren't too bad (4 days weeks, full remote, etc.), or a government worker like position where you can be paid doing jack shit.
I'm in a very similar position to what you were probably in and honestly taking a random office job does feel like the "right" choice here.
I could never stomach a 65% pay cut though because I have dreams/goals of someday not working at all. I save a significant portion of my income and live well within my means all toward a goal of retiring hopefully around 50 or 55.
One could reasonably ask why I am delaying pleasure now for pleasure then, but my answer is simple. While I am burned out and while I am struggling, I'm not sure I am struggling as much as I would be at 50/55, potentially battling some horrible illness, and unable to stop working or even cut back because I had saved so little.
I was younger and didn't have kids yet. I couldn't do it today. I was probably 8 years into my career making I think around a 100k. I travelled for work every couple months, 11 days at a time. Those trips I worked 6am to midnight every day. I was so burnt I couldn't think straight. Prior to that job I was burnt as well, I just couldn't take it anymore. I was late 20s and felt 50. I called my wife from one of the trips and asked her to just start reading me the list of open positions at her company that were not tech. She mentioned one, I said that's it. Interviewed the next week, they offered me the job that day and I started 2 weeks later. It was try something different or be miserable. I was very seriously considering enlisting as well just to get out.
1) My brother died from a sudden illness (genetic, but no known predisposition in our family, e.g., unavoidable) in his 30's with four young children. Stress was really bad for this. Accepting significant stress and burnout now for only a possibly low-stress future is not necessarily a good bet or trade-off.
2) My dad was a workaholic because he was worried about money and retirement and being the "invaluable employee" when I was a kid. He worked often until late at night and on weekends. He came to lots of my games and stuff, but he always missed everyday life. Always. He and his mates were all eventually "downsized" from his high-paying job at a Fortune 100 when they sold off his software development unit to a competitor when I was a late teenager. He realized he fucked up our relationships and was fucked up himself by the lack of work-life balance, and took a job that was less demanding and of course paid less, but it was already pretty late by then. I was maybe 17 or so already. You can't get that back, and our relationship was never the same as when I was really little.
Anyway, a fat paycheck is nice, but there are other nice things in life too. I hope you do what is right for you.
I was quickly promoted becuase of this and got raises swiftly. This eventually led to the company allowing me to start my own company and build them a saas that they paid me for every month for a decade even after I left. I found I enjoyed development again.
[ Years later, I found out, I just enjoy developing for myself but that's another story :) ]