lsp-mode got a update recently https://github.com/emacs-lsp/lsp-mode/releases/tag/9.0.0, which fixes this issue  that I was facing. So I am sharing a patch for the update.

--
Sent with Tuta; enjoy secure & ad-free emails:
https://tuta.com