Keyboard layout switch malfunction

Hi all!
I have two keyboard layouts in my Rocky 9.2: US and GR. I have assigned “Alt-Shift” combination to switch between layouts. The problem is that I need to press Alt-Shift twice when I switch from US to GR, while the opposite works fine. In other words, it behaves like there are three layouts activated and the switching sequence goes like this: GR-US-US-GR-US-US-GR-US-US…
How do I escape from this?
Thanks in advance.