Nothing like that can be said about a take home-assignment asking you to implement boring app with a backend, frontend and a suite of tests over the course of a day to an entire weekend.
Leetcode is like O(1) time work (admittedly with a large constant) that doesn't generate additional work for every company you are applying to. Take home assignments are O(n) time work where you have a bunch of crap to do for every company.