Having worked with the file provider API, it’s not ideal. It will automatically prune downloaded files and you have no control over it. One Drive had to do a hack of storing the files you want to always keep in a different location and then have the file provider extension copy from that location rather than the cloud.
I switched from iCloud to Nextcloud, but Nextcloud will also be moving to a file provider extension, not for sure how it will work with their current sync client.
Ultimately I left macOS and don’t have any problems on Linux with Nextcloud.