Is ADHD a real thing? I see too many SV engineers diagnosed with ADHD to the point that it feels like a large scam run by psychiatrists that they lowered the threshold of the actual ADHD.
If coding is really interesting to you, hyperfocus make you spend more time doing it.
Getting into the zone is probably hyperfocus kicking in.