Storage Sense is a new feature that came with Windows 10 and tries to delete temp folders or unused OneDrive data. The feature is good but sometimes some programs, probably not that good designed programs create files in the user’s temp folder and do not function properly after those files get deleted by Storage Sense feature.
So in order to disable the feature, here are some registry keys and GPOs that might help you:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy
DWORD 04 Value 0
Group Policy:
Computer Configuration > Administrative Templates > System > Storage Sense > Allow Storage Sense Temporary Files cleanup and set to disabled.
References:
https://winaero.com/disable-storage-sense-delete-temporary-files-windows-10/