If your code is available then make it into a portfolio and use it to your advantage. When I used to hire techies I loved having a portfolio of projects to look at.
Also, skillset and capability is more important to me than a pristine employment history, but you need to find an effective way of demonstrating it. A portfolio of projects is a good way I think.
Personally, if I were to take a break from being employed, I'd invest some time to leetcode, because I love problem solving and I'm competitive. I just feel that I've never really had enough time or focus to get deep into it, but I think it's a good way to keep sharp. And one can show an achievement record for such activity as well, which is a good indicator of skill.