If companies want people to come into the office, they could pay them more and make it a condition of employment. In some sense they were getting a free ride for a long time by forcing senior employees to waste hours commuting for the benefits of in person mentorship. After all, upskilling junior engineers benefits the company much more than the senior engineer who is taking time away from doing stuff relevant to their own technical skills. Now the market has shifted: you want that, you pay more for it.