There's a lot that goes unsaid in a corporation, therefore the reasons why RTO is actually happening are not the reasons told to employees. Almost no manager ever will admit they want you back in the office so they can control you more or justify middle management positions or placate their real estate buddy.
The most stereotypical reasons for RTO given are usually akin to “collaboration” “face-time” or “work culture”.
You should try, at every moment possible, to essentially weaponize collaboration and face to face time in your job. For example, maximize the chatter with your colleagues, take extra time at the “water cooler”. Take what your employer said at face value and amplify the sentiment by 100x.
Come in with cookies and cakes. Turn work culture into a party. Decorate your desk with every little thing you've ever bought from Marshall's, Hot Topic, or Five Below. Let your quirky side stand out. Break out your chia pet collection on your desk. Bring in a tub of fidget toys for the office.
If you work anywhere similar to the places I've worked, management or HR will slowly begin to write memos and emails restricting behaviors and trying to place a limit on the quirkiness to contain their rigid austere form of corporate culture that they want. But in these moments, it is your time to, very publicly and during large team huddles, point out the dichotomy between your efforts to bolster collaboration and work culture but HR/managements attempts to stifle the effort to collaborate. Get a few colleagues to also participate in this.
The goal is to, over the course of weeks or months, get your manager or HR department to be out of options when it comes to additional excuses to give other than the hidden truth about why they wanted you to RTO or what kind of “corporate culture” they actually want (usually a dry, soulless one). The aim should be to prod at that and exploit all of the initiatives they put forth as reasons to RTO so that the company feels pressure to return remote or reveal its true self to employees (that is, the draconian, backstabbing, horrid culture that many companies try somewhat hard to disguise up to a point).
And remember, always use the bathroom on the clock.