Thanks for the tag @Shaz51 - took me a bit to find some spare time to reply!
Hey @creative_writer I will echo what @tyme said about regular breaks - for instance I know I simply cannot focus on something in a sustained way for more than like... 10 minutes. Even just getting up and doing a few stretches can do wonders. Having stim toys, background music (better if it's without lyrics for me), and creating a comfy environment all help! Even my lava lamp is a great thing to have in my line of sight, so I can sorta... stare off in pondering thought and my eyes have something to entertain them... if that makes sense 😅 I always try to remind myself that it's a dopamine deficiency, so little boosts to dopamine help immensely.
There's this psychiatrist named Dr Russell Barkley who has a series of lectures on ADHD - there's a huge one that goes for many hours (I haven't watched it all but there's some really insightful stuff in there), and there's this excerpt where he talks about treating ADHD. The link takes you to the bit I thought was relevant to your question, but the whole thing is worth a watch. Caveat - it's aimed at parents of kids with ADHD and can be a bit... intense, at times, the way he talks about it. I just remember that ADHD is a developmental disorder so it is different for adults.
One of the tips he talks about in the vid is having a sugary drink next to you to sip whilst you work. Sugar helps release dopamine so having that little periodic booster can really help.
Also, listen to your body. I find that if I hit a wall, even if I haven't gotten to where I wanted to get to, I can't just push through - cos my dopamine be EMPTY! That's when taking a break, having a snack, maybe doing some jumping jacks, all can help.