Steps to reproduce:
aspell -l ru -c test.txt
I presume that the highlighting is done on byte ranges instead of character ranges.
Yeah, seems aspell returns positions in characters, when Kakoune is expecting bytes there.
Using characters for that in Kakoune is going to be tricky, especially as we now update ranges based on buffer modfiications. Using characters means that in order to update positions, we need to know what bytes they referred to before modifications. It seems easier to try to fix spell.kak so that we use byte offsets.
Use byte offsets in spell