Look, I don’t want to be disrespectful but maybe you don’t have ADHD. From the accounts I have read online, adults with ADHD have a _reaaaaaally_ hard time focusing on anything. Like stopping sentences midway to chase butterflies. I find it utterly incompatible with being an engineer. So it’s not like you can’t focus (you said yourself), it’s that you don’t want to focus.
Truth is everybody has a much harder time focusing on shitty half-baked non-testable legacy software than on greenfield interesting stuff.
My former boss used to say: “remember, if you enjoy it, it’s not work”. It’s a bit effed up to be honest, but if you aspire to go to FAANG and be paid $250k+, you may have to agree to sweat a little.