How to disable Esc key in PIE mode?

ok guys, to me the problem was i wanted to make a pause menu, when i press esc the menu will appear, but when i press esc the program closes. so the solution is simple, go to the PLAY button and changed it to “Standalone Game” and it will work