This has happened to me and it’s causing me a lot of headaches. Haven’t found a solution yet as I’ve not had the energy to figure it out.
But if I remember correctly I found a script to remove OneDrive that would first download all of the files locally.