This kind of thing makes me quite afraid for the people who live places where working from home has been absolutely awful. For a person in their early 20s at the start of their career who has maybe moved to a new place for their first job and whose workplace is where their social life starts, I can't imagine anything worse.
I would not worry, most companies will not be getting rid of their offices. The novelty of wfh has worn off and there is a big competitive advantage to having an office.
Outside of basic tasks people aren't really as productive as they say they are, they like to think they are because wfh suits them but productivity is subjective and it will be down to their employer to decide. A job is more than doing your tasks - working in teams, learning from each other, onboarding new starters with them learning from you, leaning over a desk to ask something or correct someone. People are fed up with faceless zoom calls too where you can't read a room and people just sit in silence.
We flirted with the idea of going fully remote in the summer but recently lost a pitch to a new client and it was fairly obvious our pitch was not as good as our competitor because it was put together remotely whereas our competitor were back in the office collaborating on it when it was feasible to do so.
Once you find companies losing out on customers opting for companies that have an office (due to various reasons) there won't be a lot of choice in the matter. I have noticed that lots of things have taken a lot longer than I would expect such as sorting general queries with HMRC, dealing with solicitors, insurance stuff, etc... I suspect it is mostly due to people working from home and not having the access to things that having an office set-up brings. Our company will be more likely to use other companies that have offices due to this reason.
Not to mention that those that wfh will subconsciously be sidelined in their careers from not being in an office. It's human nature. Someone who is seen daily in an office is far more likely to be promoted or get a pay rise than someone who only comes in once in a while.