How do I Restore the Current Desktop in Sonoma

How do I Restore the Current Desktop in Sonoma?

I would like to use the following macro but cannot restore the previous desktop in Sonoma.
The macro changes the desktop to an image as a visual cue which is nice.
When done it should go back to the current desktop before the macro was triggered.

cheers