Using Mbed, when I try to upload I get following output:

I get a failed but the 1. Upload works and the program runs
After them no more upload is possible
It happens with all nucleo boards
platformio.ini:
[env:nucleo_f401re]
platform = ststm32
board = nucleo_f401re
framework = mbed
upload_protocol = stlink