It's been over a decade since I have been able to share a single line of code I got paid to write.
And that's true of most developers I know; we are all doing "work for hire" under a mountain of NDAs where it would be unethical and unprofessional at the very least, and illegal at worst, for us to share the things we have been working on.
I also think it's a pretty extreme burden to hope that your candidates spend their off time either doing open source or personal projects, or just doing a generic version of their day jobs, just to have something they can show you.
I also think a lot of this isn't needed. I agree 100% that those code tests are broken... I tried Codility (I think that is what it was) sometime around 2012, 2013 and found most people were either cheating, or stuck trying to understand the problem. I've found that FizzBuzz, and FizzBuzz-like problems, despite their simplicity, are more than enough to show me what I need to know, with only 5 or 10 minutes, and the candidate can do it on the whiteboard in pseudocode.
J.Ja
J.Ja