Well, actually I first tried to deactivate my PIO core installation (remove python3.8 from my system path), to only have the built-in one of VSCode… and indeed I was still having this issue. So maybe there is a problem elsewhere.
It’s like VSCode always have two python environments when using PIO (even if I remove my global one), and got mad when switching between “pre-build” and “PIO debug”. Maybe it is related to this issue, it seems to appear mostly on Windows.
Deactivate built-in functionnality of the extension seems to work great, and force VSCode to look at the global python installation instead (with the PIO CORE). But new user who discovers PIO with VScode, and already have a python installation on their windows OS, could be facing the same issue.