no, not unless you modify the source code.
The point is to not pause the emulation with the Esc key.
You can easily disable that key with AutoHotkey or bind it to some other key.
The code I posted disable the Esc key only when the GS window(the game window)is the active window
Well, Xira didn't really say if this actually was the point, he only wanted to stop the window from closing when pressing Esc to reach the game menu. And I don't know why you would not want the emulation to pause when you have to change some settings - I'd guess you would use the ingame pause function in this case anyway, if there is one. About every PC game I know also pauses when you open the game menu by pressing Esc.