If you just convert the user over to a shared mailbox, but leave them licensed, the onedrive data will stay in place.
In your case, since you want it removed, just remove the license from the user as well once it is converted. It will then start the autoremoval process that would happen as normal, which typically is 30 days, and grants access to their "manager" in active directory to get any data that you need.
@Robert Lienmy question is similar but I want to share the onedrive files with another user. I typically convert the mailbox of an employee who has left the company to shared to keep the mail flowing for a bit but I also want to give another user access to the onedrive files. I think this may be the best option:
do not convert mailbox to shared but instead assign delegates with Full Access
then in Office 365 AC, grant access to departed user's onedrive files (I would keep the BP or E3 licensing in tact)