Keeping the working library on NAS or cloud is not supported (and is dangerous). Always run Calibre from a local drive.
Calibre reads the DB into RAM at the start of a session. Any changes during the session are written out, BUT the DB only writes to storage when it changes and only reads when it starts.
Never have 2 full calibre session access the same library, no matter where it is.
Itis ok to have a 1-way sync
to a NAS. But it is also recommended that be paused while calibre is in use.Files may get locked just at the
wrong time.

Pick a 'master' Library, and only make changes there. The other is a clone.
OR
Just set up your Master PC as a content server for remote access (you will need to configure your router for outside access) or use some other app to avoid the configure network hardware thing.