System Events got an error: Shortcuts/Automator/ScriptEditor is not allowed to send keystrokes.
On the MacOS Ventura operating system, the functionality of AppleScripts utilizing keystrokes appears to be non-functional. This includes both the ScriptEditor and Shortcuts applications. While various solutions suggest navigating to Privacy&Security>Accessibility within System Settings (not to be confused with System Preferences), removing the entry for Script Editor/Shortcuts, and subsequently re-adding them, this approach has proven ineffective on my MacOS 13.4.1 (22F82) machine. The script has randomly been granted permission and worked on a few occasions, but has otherwise failed consistently. Additionally, upon the first run of the script, a pop-up requesting permission appeared, which I granted; however, it appears that the OS has not actually granted access.
MacBook Air (M2, 2022)