Thank you for checking these points! I don’t have an immediate idea of what the problem could be. What version of PLECS and the STM32 TSP are you running?
In case you haven’t done this yet, you could try to connect external mode via serial instead of JTAG:
What environment are you running PLECS in? A few users have recently reported difficulties flashing the microcontroller on Windows 11 and circumnavigated the issue by installing STM32 Cube IDE (see STM32 PLECS coder does not compile or flash - #2 by Jonas), but that already appears to work in your case.