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.