Free up space windows 11

I have a folder on my desktop that is synchronized with nextcloud, I enabled virtual files, but every time I have to manually right-click and then ā€œFree up spaceā€. How can I automate this? When the file is uploaded to nextcloud I would like it to be deleted and only the virtual file remains. I also enabled the ā€œStorage Senseā€ feature, but it does not clean up automatically.

Windows seems to have a feature to automatically clean up virtual cloud storage with Windows Storage Sense:

I tried it, but it doesnā€™t work

Did you go through the attached documents, there should be an option to run the clean up directly:
https://techcommunity.microsoft.com/blog/filecab/windows-10-and-storage-sense/428270