Most big companies are very heavily data driven and very good at it. Pretty much all of them, independently from each other, have come to the same conclusion that working from office (at least a few days per week) is better than working from home.
For what is worth, the company I work on did this analysis and started giving hard requirement to work 3 days per week from office and soft requirements to work all the time from office. Their analysis showed that during covid, the productivity of teams who were already in place suffered just a bit. However, the productivity of teams with many newcomers, who do not know each other, was very low. Considering that in big tech companies, employees change place every 2-3 years, every team essentially becomes full of newcomers in 2-3 years, so the productivity suffers.
Again, if it wouldn’t be this way, they would not have pushed for people to come to offices. ‘Leasing the offices’ makes no sense, big tech companies (Apple in Cupertino, Google in Mountain View, Intel and Nvidia in Santa Clara, Meta in Palo Alto) own their offices. While they might lease some in other places, the majority of workers work in Silicon Valley.