"cppdbg" is the default tool provided with the official VSCode STM32 Extension so this is a minimum intrusive change to make the whole thing works as spected.
After some working, i finalized a launch.json tha actually flash the microcontroller and then disconnects, but due to early exit of the script VSCode warns about "GDB exited unexpectedly". It works but this script ends with this warning. {
"...
This is the structure of the launch configuration for VSCode, where it needs to be changed to perform flash only{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "cppdbg",
"request": "launch",
"cwd"...