It does not seem to be a problem with the colors. It occurs in all themes. If you copy the text as plain text, you get the following:
set saveTID to AppleScript’s text item delimiters
set AppleScript’s text item delimiters to {"#~,~#"}
set #=~theVariable~# to #=~theVariable~# as string
set AppleScript’s text item delimiters to saveTID
@alldritt: Do you have any idea what this could be due to or how to work around it (e.g. install something that is no longer present in macOS)? Since I really like to use the templates and the dictionary, this is very annoying.
After looking into this further, it appears to be a regression caused by Apple’s Xcode. I’ve released a new build created with the latest version of Apple’s Xcode which works in my tests on macOS Monterey 12.0.1.