I have had a go at fixing this problem - please give this a try. For some reason this does not happen in the integration tests so I was unaware of the problem. Maybe it needs very big files to trigger?
v1.66.0-beta.7595.5841b1253.fix-7405-onedrive-upload on branch fix-7405-onedrive-upload (uploaded in 15-30 mins)