I'd rather have someone spend one hour looking through my Github profile at my code than spend what little free time I have writing code which isn't always real-world applicable. I've never used any of the algorithms which I wrote code tests for in any of my problem-solving.
What I can do, if you'd like to see my algorithm skills, is send you a link to my Codewars profile, so that you can take a quick peek at the katas I've completed. I'm almost certain there will be an algorithm in there that I've already coded in whatever language I'm trying to improve my skills with. It will also take a lot less time and back-and-forth emailing or LinkedIn messages.
Why do I need to write an algorithm to reverse a string? Someone has done it before (probably in a more efficient way than what I can churn out in a stressful situation). Why can't I reuse code? I do it all the time and it's a common programming practice...
Code tests give me a sense that the interviewer doesn't trust or believe what I've written in my CV. I understand this, because people do lie and you want to be certain that the person you're hiring is not a fraud and can do the job.
However, how do you know that person doing the code test is indeed writing it themselves and not just copying from Stack Overflow or getting someone else to write it for them, or copying from a cheatsheet? How about Github Copilot? Why would you even consider hiring someone who you seem to distrust? What guarantee do I have that your company is a good company to work for?
Software engineers are an expensive commodity and you don't want to take a risk. I understand this, even though I have never been involved on the hiring side. I've failed plenty of code tests in the past, I still do. They make me feel horrible about my skills and afterwards I feel that I need to do more code katas, because I am shit and need to code code code every waking minute of my life.
Practice does improve your skills, but it's not just the programming skills that matter and I would like to take some time each day away from the code editor to pay attention to my physical and mental health.
So, no, I will respectfully decline your invitation to do a code test :)