@vkireyeu good news!
If you are willing and able, it would be interesting to see if you experience the same issue with [Scite](https://www.scintilla.org/SciTE.html) which is the reference editor for the source code editing widget/component Geany uses (Scintilla). If you experience the same issue with Scite, it would show that there's probably not an issue with Geany's code and the bug could be worked on upstream in Scintilla.