For me the case was a bit different, because after cloning the repo i was copying certain lib files over to build the project. However, when i copied them in the cloned repo, the git repo was not recognized by vscode.
I found out after some manual work that the some copied folders had a .git file (file, not folder) in them which made the overall project unable to be recognized. Try deleting these .git files in any nested directories in the main project.
Also, the .git won't show up on vscode, so I used file explorer