Fortunately, Serena has recently been extended to use JetBrains instead of LSP (via a plugin), solving exactly this issue. LSP will never be as good as JetBrains' parsers.
Been working like hell on this one: a fully capable Agent, as good or better that Windsurf's Cascade or Cursor's agent - but can be used for free.
It can run as an MCP server, so you can use it for free with Claude Desktop, and it can still fully understand a code base, even a very large one. No API key or subscription required!
We did this by using a language server instead of RAG to analyze code.
Can also run it on Gemini, but you'll need an API key for that. With a new google cloud account you'll get 300$ as a gift that you can use on API credits. Local models work as well.
https://github.com/oraios/serena#the-serena-jetbrains-plugin