I've found a couple times now that the reason lsp-mode doesn't work and keeps asking to restart the server is because I had another binary in my path with the same name as the server it's trying to call. For example just today this was happening with pyright, and it worked perfectly again after running "pip uninstall pyright" in a terminal (or maybe it was called lsp-pyright). I believe the lsp-mode keeps its server binaries in a separate folder.