This is a result of losing focus while an input is held. To un-stick the input you need to press and release the key. You can prevent this altogether by enabling “pause on losing focus” in the settings (Escape)