Not really sure why this became a problem, I thought there was a tool that you ran against your domain to clean up this kind of chaos before you even start your migrations. It finds duplicate UPNs and such. Why is this not something resolved in that way.
But if we as the consumer are having to update all of our scripts to fit with this new scheme, then Microsoft should eat their own dog food and fix all of the locations within Exchange Online where they use the Name variable and trade it out with either the DiplayName or the Alias field. One of these locations would be the following:
Exchange -> Public Folders -> Public Folders -> Click the line of a public folder but not the link -> Folder permissions Manage. On that Screen it still shows the first column as NAME. For everyone prior to this change it shows their name but for new persons added whether via GUI or powershell show the EDOID value. Or they could just replace this legacy employee picker with the likes of the the screens where you are adding delegates to shared mailbox which displays the User Principal Name. When was the last time anyone really needed to see the SID displayed in a people picker screen?