You can switch jobs. Or you can stick it out until the boss realizes that they are losing employees to companies that didn't mandate in-office, and undoes the mandate. It's really quite easy.
Or the labor market will split into companies and employees who insist on in-person and those who demand/offer flexible arrangements. The question is what the size ratio between both markets would be.
It's not really an "or" imo, that's been the case for a long time and will surely remain so short of something far crazier than the current pandemic. But agree that the question is what size ratio we'll end up on, as surely won't feature quite as much WFH as right now, and equally unlikely to go all the way back to pre-pandemic levels.