It's very weird, but sometimes it can be fixed when you just restart your Visual Studio Code. Sometimes after the big merge or fixing those merge conflict, yarn behaves weirdly. I recommend you to restart it by closing the visual studio code and open it again.