Brackets and such changing the color of text but not in other keyboard layouts

Whenever I use a [] and write something inside it, it changes the color, but in a layout of another language it doesn’t, for example pressing \ in english makes use of the command it is tied to, but pressing \ in a portuguese layout it makes a ], and it doesn’t change the color nor make any commands, so looking how other layout affect the use of the commands would be nice, and also making a way for standard commands be used just as a character, like using [] without changing nothing

Please resubmit this bug report and make sure that: 1) you follow the bug report template, 2) you use the default theme (no css) and 3) there are no third-party plugins enabled (You can use the sandbox vault for 2 and 3).

Attach a screen recording of this happening in the sandbox vault.