For some reason Godot HTML5 export does this strange thing if you switch tab in browser or click fullscreen button in the bottom right corner, then input is not received.
The only way to fix the issue which I found is:
- Reload page
- Do not switch browser tabs
- Click Run Game, wait for the game to load
- Do not press fullscreen button
- Now input should work properly