'NSWindow' ERROR

Hello!

I have export my sketch as app for MacOS from P3.5.4 java in macOS 13.6, where it runs well.
When I I try to run the app on macOS 12 doesn’t works, it comes the follow ERROR:

Application Specific Information:
*** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘NSWindow drag regions should only be invalidated on the Main Thread!’

abort() called

terminating with uncaught exception of type NSException

Where is the problem? What could I do to solve it?