The "talent" who wants to leave as soon as you ask them to return to office are probably not the employees you wanted to retain anyway.
I prefer to also focus on not doing soul destroying work, working with good collaborators, and earning enough to enjoy the rest of my waking hours. That narrows the employment pool down a lot.
If you're skilled enough and have options and a network, it can even be more prudent to sit out the employment market and contract for a while until a good role comes along.