Stop the spinning rainbow cursor while doing tasks that take time.

Hello everyone,

I am creating a simple application using AppleScriptObjC to modify/theme macOS. While doing some copy tasks, the spinning rainbow cursor keeps appearing onscreen and prevents me from pressing the “Cancel” button while the app is running.

The question is how can I stop that annoying spinning rainbow cursor?

Thank you.