However, I can only upload the code if I disconnect the the jumper connecting + to 3V3 on the NodeMCU first. I then have to reconnect it actually to use the uploaded sketch.
I am using the current version of the Arduino IDE 1.8.13 and all the boards and libraries are up-to-date. I have tried this on both my MacBook Pro and on a Chromebook using a Debian container and the behaviour is the same for both. I've also tried pressing the flash button at the time I plug the NodeMCU in, holding it all the time I'm trying to flash and pressing rst and flash at the same time then releasing rst first then flash. None of that made any difference.
Am I doing something wrong or is there a way round this? It's a bit of a pain having to keep plugging and unplugging the jumper and if I actually made something using the rotary encoder I'd have to desolder wires just to re-flash and I'm sure that cannot be intended behaviour.
[Edit]
I have also tried a different NodeMCU clone using a different cable on an Ubuntu laptop with a fresh installation of the Arduino IDE (plus ESP8266 board etc.). The behaviour was identical.
I wanted to see whether I was actually entering flash mode so I tried setting the speed to 74880 so I could read the boot message but it refused, giving the following error message:
Error while setting serial port parameters: 74,880 N 8 1
Setting other speeds such as 9600 or 115200 did not result in any error messages. Again, this behaviour was consistent across all the devices I tried.