The beautfiul thing about these situations is that if the company demanding no WFH is doing it for productivity reasons, they could much more simply demand employees reach a minimal productivity threshold or be let go. No need to mandate what methods an employee uses to be productive, be it working from the home or office, if productivity is the goal, productivity should be the target.
When there is a mandate to return to the office, it really makes me wonder if the employer can even tell if their employees are productive at all, much less know that they are more productive in the office. If they could tell, they would simply use that measure directly.