That makes sense. The thing is I was playing in full screen, so pressing Esc closes the fullscreen first, so I never expected it to also close the settings menu.