Nasty delay when executing apple script from Mac application

I am emulating modifier keys trough Apple Script from my application. With previous version of beta when I tried to execute the apple script I got error message stating that this is not allowed. With current version of the beta I can execute the apple script (after giving my app automation privilages) but there is about 3 secs delay. Any one else having this problem? Is this a bug in Mojave?

Replies

I am also having this problem in the release version. Have you found a solution yet?