How to stop player taking over the foward axis after initiating a interaction

And the issue manifest after doing the above only? Not when setting input mode?