Layoffs are a costly operation for the company and C-level leadership knows it. They are gambling on folks leaving by their own choice due to RTO. It's really a win-win for them: they get to justify their costly real estate expenditures to stakeholders and maintain their tax breaks from local municipalities all while trimming down their payroll.
I suspect engineering and possibly other business units are somewhat "safe" right now. Not because C-level isn't eager to trim down the payroll and bump their bonuses, but because they are banking on you leaving by choice. They hope to induce some voluntary attrition because when you leave by choice they don't have to pay your severance out. RTO is only a play to please the board and to encourage people to leave. The latter of which will become only more apparent when they bump that "2-day thrive everywhere" to a "5-day thrive in office policy".
Don't take the bait! Finding a new position in this market is a complete disaster whether you are currently employed or not. It's better to have a leaving bonus on your way out.