iCloud & iCloud Photos · iCloud Photos and the Photos library
Can I keep my Photos library inside iCloud Drive or another synced folder?
Short answer: No. A Photos library is a constantly changing database, and syncing it through iCloud Drive or another cloud folder can damage it. Keep it in Pictures or on an APFS external drive and use iCloud Photos to sync.
No. Don't keep a Photos library inside iCloud Drive, Dropbox, Google Drive or any other synced folder. A library is a database that Photos writes to constantly, and syncing it as files can damage it or create conflicting copies. Use iCloud Photos to sync your photos instead.
Good places for a library are your Mac's Pictures folder or a locally attached external drive formatted as APFS. See moving the library to an external drive.
Storage Studio follows the same caution: it treats the Photos library as one item that only Photos should move.