The user can decide whether they allow or block access for your application. The dialog comes only once and if you need, the user can do the checkbox later in the privacy settings. Or reset the settings via Terminal with "tccutil reset AppleEvents" command for all applications.
New function will be available in 8.4pr4 in the next days. If you need it today, just email us.
PS: You can do the same in Xojo with our NSAppleScriptMBS.DeterminePermissionToAutomateTarget function.
PPS: You may also need for runtimes to add entitlement in code signing with com.apple.security.automation.apple-events item. Plugin and app must be signed by same team ID.