Sidenote: a lot of companies follow data-driven approaches to their own culture, where they try to inform policy choices using statistics. I would argue that measuring the impact of remote work on overall productivity is extremely hard, and it will likewise be difficult for them to measure how many are leaving due to RTO. Most people aren't honest on their exit surveys when quitting.
I’d expect this to not matter at all.
Ostensibly, they want RTO because it's RTO. The controversial theory is that it's all a ploy to get some portion to quit, a layoff in disguise.
The people who they actually need to keep will not be asked to return.
Amazon has enough prestige that they'll be able to recruit smart engineers to replace those leaving. I think the important question here would be if there is knowledge loss which can't easily be replaced. I'm sure there will be some, but will it be significant? Probably not.
I've seen engineering teams cut in half without significant knowledge loss. By significant I mean engineers are confused about how significant parts of the system work because the team that maintained those parts of the system are no longer around. Generally what happens is you lose people with familiarity with certain parts of the system so productivity drops temporarily, but broadly the team still understands how all the bits fit to together.