While interviewers are initially surprised at my unwillingness to answer such questions, it often starts a short discussion about interview practices, and my observations about fantastic high-performing colleagues who have been passed over because they failed at interview coding challenges.
Thus far I haven’t lost an opportunity by declining to do coding exercises. In contrast, the couple of times I’ve played the leetcode game, I’ve lost the opportunity despite doing very well in the other interview phases.
I realize I have an advantage of being in this business for 30 years, having a lengthy and robust CV, and having been a hiring manager who can talk about my own experiences of being the interviewer rather than the interviewee.