The steps below should solve your problem:
In Visual Studio Code, click the extensions icon in the activity Bar on the side of the window. In the Extensions view, search for "Pylance" and "Flake8".
Click on the gear icon next to the installed extensions (Pylance and Flake8) and select "Uninstall" from the context menu.
Another way, which is the easiest way, is below.
pip uninstall pylance
pip uninstall flake8
If you used Conda to install the extensions, run the following commands:
conda uninstall pylance
conda uninstall flake8
After executing the appropriate commands, Pylance and Flake8 will be uninstalled from your PC and Visual Studio Code environment.