Unfortunately, OneDrive does seem to suffer from failing to file the file correctly under some condition. It is extremely rare, but the problem is OneDrive is reporting as having saved correctly, whereas, it hasn't.
OneDrive's API and performance for third party apps isn't great, the permissions required are also excessive, I wouldn't agree to them.
If I had to use OneDrive for some reason, I'd run the local sync client and use the Desktop app working against the locally synced version of the file. That won't suffer from the corrupt write failure and doesn't require you to agree to any permissions for the app.