Some Arduino version mismatch? (I’d expect create.arduino.cc/editor to have the latest, but maybe that’s not the case. I guess you could always use that one to compile the program, though )
EDIT: Seems it depends on the core – compile for “Ardino Nano” in the cloud IDE and it works as is, compile for “Arduino Nano Every” and it breaks. More below.