It is related to either having two monitors or the computer switching between the "high performance" and the standard display drivers.
The problem is Arduino had to switch from Oracle JRE to OpenJDK in order to notarize the Arduino IDE to meet Apples new requirements introduced in macOS Catalina. But it turned out that OpenJDK caused a lot of problems, including this one. They went back to Oracle JRE in the Windows and Linux versions of the Arduino IDE, but were not able to do this with the macOS version due to the notarization requirement.
The workaround is to use Arduino IDE 1.8.10. You can download it here:
Since 1.8.10 is not notarized, you might get the warning:
"Arduino" can't be opened because Apple cannot check it for malicious software.
If so, you can follow these workaround instructions:
This solution did not work for me. 1.18.12 was working perfectly under MacOS 10.15.3 but would fail to open after upgrading to MacOS 10.15.4 yesterday. System log shows:
com.apple.xpc.launchd[1] (cc.arduino.Arduino.1100[1524]): Service exited with abnormal code: 255
I tried 1.18.10 as recommended, but with same result. I found this thread:
and it turns out that both 1.18.10 and 1.18.12 work ok if they are started from terminal.app, as in:
<machine_name>~ % open /Applications/Arduino.app/Contents/MacOS/Arduino
As for the proper solution, that's beyond my pay grade