I have tried multiple ways of uploading to a Teensy 4.1 headlessly from a Raspberry Pi using the Arduino IDE over VNC, arduino-cli & teensy_loader_cli.

This is the command I use with...