How to stop the launch agent from repeatedly launching a given AppleScript
The answer is usually that you need to call xpc_set_event_stream_handler.

I found this amazing utility that will call xpc_set_event_stream_handler to remove the event from the queue, and then call your desired application. It allowed me to solve the problem you are having without writing/compiling any code. Check out github.com/snosrap/xpc_set_event_stream_handler and have it then call your osascript. Should solve your problem.