Hello,
It seems there's a bit of a misunderstanding regarding Storage Sense. Storage Sense primarily handles the automatic cleanup of user content, such as files from the Recycle Bin, Downloads folder, and OneDrive, when it is turned on. Therefore, toggling Storage Sense on or off wouldn't directly impact the temporary files created by applications.
Have you tried simply unchecking the option “Keep Windows running smoothly by automatically cleaning up temporary system and app files”? This setting is more directly related to the cleanup of temporary files and could be the cause of the Temp folder files being deleted. Unchecking this box should prevent Windows from automatically removing those temporary system and app files.
I hope this information helps.
Best regards,
Karlie Weng