LaTeX highlight in TikZ environments is wrong.
Look at https://tex.stackexchange.com/a/564540/38080 (will add a snapshot as soon as I can).:
It seems that a newline in a macro arguments desynchronize the parser...
Thanks!
PS: could be this:https://github.com/highlightjs/highlight.js/issues/2709 ...