If you are already pressing “Upload and Monitor” in the project tasks window, it could be that the monitor opens too later after firmware has already been flashed. Check your monitor open delay in the VSCOde extension settings as Any way to delay opening serial port monitor? - #2 by pfeerick.
The output does appear if you manually push the reset button of the board, right?