Teensy 4.1 Upload Successful but Board Does Not Run Code

I am new to PlatformIO having moved over from the Teensyduino IDE. I have a Teensy 4.1 and code that works correctly when uploaded through Teensyduinio. When I try to upload this code using PlatformIO, I get the following message.

Processing teensy41 (platform: teensy; board: teensy41; framework: arduino)
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy41.html
PLATFORM: Teensy (4.15.0) > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
 - framework-arduinoteensy 1.156.0 (1.56) 
 - tool-teensy 1.155.0 (1.55) 
 - toolchain-gccarmnoneeabi 1.50401.190816 (5.4.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 93 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Linking .pio/build/teensy41/firmware.elf
Checking size .pio/build/teensy41/firmware.elf
Building .pio/build/teensy41/firmware.hex
Configuring upload protocol...
AVAILABLE: jlink, teensy-cli, teensy-gui
CURRENT: upload_protocol = teensy-cli
Uploading .pio/build/teensy41/firmware.hex
Teensy Loader, Command Line, Version 2.2
Read ".pio/build/teensy41/firmware.hex": 21504 bytes, 1.1% usage
Unable to soft reboot with USB error: No such file or directory
Waiting for Teensy device...
 (hint: press the reset button)
Found HalfKay Bootloader
Read ".pio/build/teensy41/firmware.hex": 21504 bytes, 1.1% usage
=========================================================================================================================================================================================================================================== [SUCCESS] Took 1.48 seconds ===========================================================================================================================================================================================================================================

But the Teensy does nothing from this point. I am running MacOS on an M1 chip and connect to the Teensy using USB. My configuration is as follows:

platform = teensy
board = teensy41
framework = arduino
upload_protocol = teensy-cli
build_flags = -D USB_SERIAL

In which way is the sketch not working exactly? Can you use blinky as a reference code, does it also fail?

What is the upload log in the Arduino IDE? (If needed, File → Preferences → Verbose Upload)?

Looking at the example made me realise what I was doing wrong. I assumed the upload button in the PlatformIO extension for VSCode ran the currently opened .cpp file, not the one located in src. This was the default boilerplate code which explains why the upload left the Teensy doing nothing. Moving my code to this folder resolved the issue.

Thanks for pointing me in that direction.