The problem was that I forgot to exclude my vitest.config.ts from tsconfig.build.json, as shown below.

It made vitest.config.ts get compiled into a vitest.config.js inside the dist folder:

Which made the extension think it should consider that file and locked it for some reason (I don't know why, to be honest).
Adding vitest.config.ts to exclude solved my problem.