Guys I found the solution!. The problem is with powertoys. You just need to disable "Keyboard Manager" in its settings. It seems to break UWP games in fullscreen mode, including Sea of Thieves and Forza Horizon 4. (Credit to u/DVXC he told me about it)
I am not sure Envy, give it a go