We recently added the ability to transfer ownership to another user when deleting a user’s account from AAD from the M365 admin portal. If no entry is provided, the default will transfer to the manager. https://docs.microsoft.com/en-us/onedrive/retention-and-deletion
The manager or newly assigned owner will have the ability to sync that content or download and then move to a shared library or their own OneDrive.
An error occurred while saving the commentSzarka Péter commented
For instance if the user's regular mailbox turned into shared mailbox in Exchange Online the OneDrive folder should turn into a SharePoint folder and the members of the shared mailbox can get permissions on it.
We’re looking at two related pieces of this:
1) For OneDrive for Business, enable shared folders to be added to the root of the OneDrive folder at all (like in OneDrive Personal).
2) For OneDrive across business and personal, enable shared folders to be placed into subfolders.
We appreciate your patience; this is significant engineering work given the architecture of the products and our diverse customer base, spanning individuals to small businesses to multi-national enterprises to government agencies. We aim to address this while maintaining our industry-leading security, privacy, and compliance commitments.
Thank you for the continued feedback.