I've done a bit of research into this topic as my startup is building a platform that combines leetcode and traditional take homes. I have come to conclude that it's not only unethical, but it's not in the best interest of the company. We landed on 1h "take homes" as those that maximize the completion rate. It was also clear that take homes, or work sample tests, are amongst the most valid signals for future on the job performance. But companies abuse their power with extra long take homes and don't even have the bandwidth to review and provide feedback.
I should probably not mix take-homes and work samples, but work sample tests do have the most valid signal [1][2] (I'm aware one references the other).