iCloud sync fails with "Not enough local storage" despite "Optimize Mac Storage" being enabled
I have a photo library of about 200,000 photos in iCloud totalling about 1 TB of storage space. I want to have this library available on my Mac as it's much easier to manage the library there than on my iPhone.
However, even with the "Optimize Mac Storage" option turned on, Photos is refusing to sync my photo library with the error message "Not enough local storage".
My photos library is on a dedicated 100GB volume that I'm not using for anything else. The volume is showing 88.9GB of 100GB used, but with an available capacity of about 70GB since most of the used space is purgeable. So the actual disk usage is only about 11GB, which I presume is what Photos needs to store the thumbnails and metadata.
There should therefore be plenty of space for Photos to continue syncing the library, since it can just purge whatever space it might need.
I've tried some tricks found online for forcing Mac to purge purgeable space on a volume, like creating large files and deleting them again, but this doesn't appear to be working (I get a similar error that there isn't enough space on the volume).
I have tried deleting and recreating my Photos library, which worked for a while before filling up again and giving the same error. As it takes many days for my library to finish the initial sync, this isn't really a feasible workaround.
Does anyone have any suggestions for additional things I might try?
MacBook Pro 16″, macOS 14.1