Not OP but I have the same problem. I've found some things just work better for me, like using (neo)vim (or emacs I guess) instead of something like vscode helps me stay in the zone more.