Having worked on a Dash app with tens of thousands of LOC hundreds of clientside callbacks, I find it conceptually simpler to just trick my IDE into realizing that these multiline strings are JS,.
If you have TreeSitter support in your editor, you can get all of the LSP support you want using TreeSitter injections, as I describe here Syntax Highlighting in Clientside Callbacks Using TreeSitter .