Sometimes it may so happen that you move your main folder and forget to update the new path in the Pylance icon on the window's down-right side. Just updating to the new path worked for me.