I often need to switch virtual environments. I do this using (conda-env-activate ...) followed by (lsp-workspace-restart). It works well, but quite reliably I will eventually be getting messages such as
LSP :: Sending to process failed with the following error: Process mspyls not running [6 times]
It seems that perhaps there's some cleanup that's missing when restarting the workspace.