Enter key input not working ???

I have two maps, the first one has an Input key function for the enter key which displays the menu on clicked, and the second map has just a back button which loads map 1 on clicked. But when a player goes back to map 1 from map 2, the enter key input is not working anymore. The method is in the widget that the map 1 loads by default. So, how can it be fixed ???

Setting the input mode to Game and UI solved my problem…