To quote a too commonly posted item over the last 13 years:
If you keep your library on a networked drive (NAS, OneDrive, DropBox, whatever), it is not a question of
if your library will be corrupted but
when.
See
I am getting errors with my calibre library on a networked drive/NAS? in the calibre FAQs and
SQLite Over a Network, Caveats and Considerations for more information.