Disable (shortcuts/defualt keys) when pie or game is running

For instance “Escape” and “f1” “f2”, all do things in the editor but I want them to do diferent things in my game.
how do I disable normal shortcuts? while still being able to use them (for what I want)?

I’m sorry if this question has already been answered but I could not find any result.
I’ve waited a long time to ask this because I figured I would eventually Stumble upon the answer.