Double click fix in pause menu

Hi, I’ve made a pause menu once, but it suffers from a pretty fundamental problem, namely. In order to get to it I have to press esc twice or click the button twice to e.g. return to the game. `


I’ve also looked at various tutorials, and everything should be OK. Yet this error is appearing.