This issue was addressed by adding an additional prompt for user consent. This issue is fixed in macOS Sonoma 14.4, macOS Monterey 12.7.4, macOS Ventura 13.6.5. Third-party shortcuts may use a legacy action from Automator to send events to apps without user consent.
https://support.apple.com/en-us/HT214085
https://support.apple.com/en-us/HT214084
https://support.apple.com/en-us/HT214083
http://seclists.org/fulldisclosure/2024/Mar/23