I don't think it's true. This whole office/in office/rto has to do with people being dishonest about why the rto needs to happen and being stuck romanticising the good old days.
There is huge overhead to in person work and the benefits are wildly oversold.
IMHO a professional software developer in a company with good management/clear direction will thrive in a remote work scenario.