UMG Menu show mouse

It’s always good to map your inputs in Project Settings/Input instead of using keys like that directly. Escape might be tied to something else removing focus from your blueprint. Also, what might be happening is that your cursor is hidden in the game and once you spawn HUD it stays that way. Try changing Cursor Visible inside your player controller when you show/hide your HUD.