In Sequioa 15.2 I was able to get the keystrokes working by:
Creating an "Application" in the Automator.
Adding the "Run AppleScript" Action to it, containing the keystrokes.
Export it to my user's Application folder.
Import the new Application in Shortcuts and adding it to the Dock.
Open Settings > Privacy & Security > Accessibility.
Making sure that all three Automator, Shortcuts and the new Application were added and enabled.
After a reboot it still works, but upon any change to the Shortcut (adding it to the Quick Actions for example) I have to disable and re-enable Shortcuts in Settings > Privacy & Security > Accessibility.
Note: Running the Shortcut from the menu bar completes normally without sending the keystrokes (also without any blocking notification).
Topic:
App & System Services
SubTopic:
Core OS
Tags: