On questions where the code overflows, the syntax highlighting stops wherever the end of the content visible without scrolling is.
![enter image description here]()
Scrolling down a bit fixes the issue. This problem occurs in Safari on macOS 12.2. I don't have any extensions that could be causing the problem.
After scrolling down:![enter image description here]()