I suspect that it’s more a problem that VSCode PlatformIO extension appears to require version >=4.1.0
of the PIO Core (understandable as it references features added in that version)… so when you restart VSCode and the extension checks what version is installed on startup, it updates. So you’ll need to revert to v1.9.3 of the PlatformIO Extension in VSCode, and disable extension auto-updates, else VSCode will auto-update the extension, and set the whole merry go round off again.
To disable extension auto updates:
To install a specific version of an extension, follow this and then pick your version:
PlatformIO does have an update checker, but I don’t think it updates the Platform IO core, but instead checks for updates to platforms and libraries. You can see the settings for that, and other stuff, by entering pio settings get
at a terminal prompt where PlatformIO works.