You should be able to click the X to exit the search feature, instead of awkwardly pressing Esc