I had the same problem, where only some of the syntax highlighting was coloured correctly, just like yours. I was using Dark(Visual Studio). What worked for me was installing Pylance and changing the color theme to Dark Modern.