Attached macro is not working properly after updating to macOS Sonoma. It opens two different Finder windows, one the intended folder and the other iCloud Drive/Shortcuts. Is the change in behaviour a bug in macOS Sonoma?
First, if you want the folder opened in the Finder, you should explicitly select the Finder in the action - any application could be the “editor” for folders.
As for why two folders open, that sounds like Sonoma / iCloud drive weirdness. Do you get a different result if you use the Terminal command:
No get same behaviour when using 'Execute Shell Script' action.