Visual Studio Code keeps "disconnecting"

I am using Visual Studio Code with the plugin to connect with my project. I do that, because I want to use copilot. However, when I want to save the file, it often tells me this here:

´Failed to save ‘xyz.js’: Unable to write file ‘projectstuff/…/xyz.js’ (Error: Bad Request)

I can “fix” this by right clicking the project and pulling the latest version, but then I need to copy my changes and reapply them. It happens also randomly between 1 and 20 minutes, so sometimes it’s pretty frequent. I have no idea what is triggering this. How can this be fixed?

@yak32