TL;DR - You can probably test ability/desire to dig through "muck" as part of screening or take home questions.
I am just not sure if people that you may want hire, will eliminate themselves because your company just isn't that good / desirable to work for....
I worked for a company that gave out a screening question where the actual coding problem was fairly trivial, but there was a lot of googling to find out how to use the libraries/frameworks that the question mentioned/required.
It wasn't my question, but part of my process is to personally solve all the questions given to candidates - so I can evaluate what potential challenges the candidate might face / get a feel for the complexity and any ambiguity in the questions. Doing so I found the question both irritating and interesting, interesting because I learn't a new (to me) library, irritating because what seemed like a trivial problem, forced me down a set of rabbit holes to work with the libraries. It took me about 45 minutes to come up with my answer, but it was a Java question and we were a Java shop, so I was already familiar with most of the stack.
The answers we got from candidates varied, some candidates totally ignored the library specifications and just solved the trivial problem, some tried to use the libraries, but didn't do a very good job and some fully embraced the libraries and used them correctly.
The on-sites that I took, generally matched the screening question - people tended to do well in both or not well in both.
However per my TL;DR - I don't know how many candidates aborted the process because they didn't feel the time investment was worth it.
PS I started this answer saying "muck", because if you have a large but pristine code base with amazing documentation, 100% code coverage with full CI/CD, well thought out requirements and clear stories it's far less likely developers will struggle.