This is absolutely a stealth layoff.
Companies are using Return To Office (RTO) mandates to cut down their workforce without having to fire people. It has the benefits of the company not even needing to decide who to lay off, and eliminates compensation packages. They also don't have to announce it as a layoff.
For instance: AT&T recently mandated that 26,000 managers across all 50 states "work in person" but only in offices in 9 locations. Such a policy will undoubtedly result in many, many people quitting, but it's not a "layoff" is it?
Same thing here. You're required to return to work, but there isn't space for you; the confusion and erosion of employee morale is a feature, not a bug, and is meant to reduce the workforce. After the workforce has been "naturally" reduced, they can evaluate where in the organizational structure the labor shortages are causing pain points and hire in those areas only.
This is, of course, emphatically an anti-labor move as it displays blatant disregard of the stress put on the workers during the transition, and will likely result in those most vulnerable to exploitation (those trapped in their employment due to financial or healthcare related reasons) making up the bulk of those left behind, as workers with more flexibility jump ship to pretty much anywhere else.