Update: I found a fix here:
I needed to grant access to my compiled app (snap2GC.app) in the Accessibility and Full Disk Access options of Security and Privacy preference.
That worked for my Macbook but the iMac would not allow the change: “There was an error in Security & Privacy preferences”…
I managed to fix it by copying over a previous version of the app, complied under High Sierra. It seems that compiling Applescript under Mojave exacerbates the bug. I was able to grant Full Disk Access and Accessibility access to the older compiled app and now it works.