A take home test is a very clear statement by management that your time is less important than their process.
As a professional, you only have your time and skill as your saleable assets. You have the choice of giving them away for free. You could, of course, take the test and then present them a bill for your services.
Another interesting question to ask would be: "How many of your senior management were hired as programmers who passed a whiteboard test or a take home test?" Clearly, according to the market myth, those who did pass were "the best and the brightest". It only stands to reason that upper management is composed of programmers.
Ball-pits are in plain sight, if you choose to see. Ball-pit companies who whiteboard and use take home tests are also in plain sight, if you choose to see beyond the "best and brightest" market hype.
I really respected a Lisp legendary programmer, Daniel Weinreb. He worked at ITA software on airline reservation software. We had many discussions. I'd love to have worked with him. But ITA has the same testing game and I couldn't convince myself to bother. I'm certain I could pass their tests. I've been programming in Lisp since the 1970s. And ITA was a 5-star restaurant kind of company. But those tests are a "Clown-Nose" warning to me. I just walked away.
Walking away has a cost. But so does management games like quarterly status reviews, yearly performance reviews, monthly reports, 1 to 5 rating scales, etc. Clueless management does things like make a rating scale of 1 to 5 and then fires the 5 performers. They have never heard of the Deming Prize (https://en.wikipedia.org/wiki/Deming_Prize), and never bothered to learn what Deming makes painfully obvious. You really should watch Demings Red Bead test https://www.youtube.com/watch?v=ckBfbvOXDvU
Ball-pits and Clown-noses are a sure sign that managers are not well trained, indeed that they are not themselves professional managers.
On the other hand, if you have a degree and years of experience, would a license matter? I wouldn't object to licensing for programmers. At least there would be common standards, not random whiteboarding.
Of course, you realize that licensing has a dangerous downside. If you're a licensed programmer and your company get hacked because of your bug, you would be liable. If your code fails to detect a pedestrian or fails to brake, you're liable for murder. If the Ariane rocket is destroyed and a multi-million dollar satellite is destroyed, you're now deeply in debt. If your Therac 25 software makes a mistake, again... murder. So be careful what you wish for.
At a robot company I worked for we agonized over this. Could a robot, driven by our software, accidently kill someone? To get around this we put up hardware safeguards; chain link fences with kill switches on gates, pressure pads with kill switches on floors, and any other hardware we could invent. In theory, we programmers were not liable, but if we were licensed we probably would have been.
So, yeah, license programmers. Require a degree. Require certification. Require certification in the language you use and yearly refresher courses. Require proof-carrying code. Require financial bonds to cover losses caused by your code. Require insurance to cover losses covered by your code.
That's probably a good solution to the whiteboarding issue.