The basic reason for this is that in Lightroom Classic, originals are stored locally and everything derived from them (collection instances, online galleries) points back to those locally stored originals. Delete the local originals, and everything pointing back to them is also deleted because the originals are gone.
If you were using Lightroom (not Classic), it would be the opposite: Originals are stored in the cloud, and everything points to those. With Lightroom (not Classic), you could delete locally stored raw files without affecting anything else, because the system was not considering those local raw files to be originals. They are more like locally cached raw files, since the originals are stored in the cloud only.
@Agresvig wrote:
So: How can I retain a synced collection in the cloud, after deleting the files locally?
Based on the descriptions above, one way to get what you want is to switch away from Lightroom Classic to Lightroom. But that might not be what you want, because it would mean uploading all originals to the Adobe cloud and paying for that storage, and all local folder organization is not preserved in the cloud.
If you need to continue with Lightroom Classic with cloud syncing on, there is no way for you to retain a synced collection in the cloud after deleting the raw files locally. It’s a contradiction — you can’t possibly have a synced collection where the originals are no longer available to sync with.
One possible way is, first, turn off sync in Lightroom Classic, then upload to and manage just those online albums from any non-Classic version of Lightroom, including the web or mobile versions. With Classic syncing off, you can put whatever you want in the Lightroom cloud, and Lightroom Classic will not try to take it over and download all the images to a local folder.
Now, if what you really want is an online album — without original raw files — synced to Lightroom Classic so that you can control the album from there, then export the raw files to JPEG versions, in a local folder, which you add to the Lightroom Classic catalog. Then create a collection from that, and sync that to the Lightroom Photos cloud. That sounds like a lot of steps, but it can be streamlined by taking advantage of features such as the “Add to This Catalog” option and “Added by Previous Export” collection when you export the JPEG versions. But you would still need to keep those local JPEG images; this still does not let you keep images only in the cloud and not locally.