Is there a way to programmatically force a desktop refresh in Windows 11?

Frequently when my code places a new file onto the desktop, or removes a file from the desktop, there is no visual change, unless I force a desktop refresh by manually pressing the F5 key. I’ve tried programmatically sending “F5” to the desktop via Wscript.Shell – but no success, and older methods I’ve found in searches don’t seem to work in Windows 11.