My M5STACK CORE started behaving like this. It seems if I hit the power button just after the Arduino IDE starts the "connecting..." dialog then it will upload. This is kind of a pain because the device is in another building and I am remoted in.
Any Ideas?