If you are truly exceptional, you will get a WFH allowance in most organizations - that said, most developers are not.
If you want to be remote-first you will have to become mission critical, otherwise it is hard to justify not hiring someone in India, Israel, or Poland remotely.
It’s currently a buyers market for employees, they can flex as much as they want and desperate people will still flock to them.
The RTO mandates were not done with productivity in mind.
It is much much easier to build trust in person, which is important for efficient teams.
In the end, both modes have pros and cons, but there is indeed a lot of research indicating remote teamwork is much more challenging on many dimensions
Again, granted -- I'm an outlier, but that also means that I can just operate at my full capacity when I work with text and cannot when I work "in person".