Pretty non trivial, but could be worth looking at as the UX variation may end up being one of those "sometimes this, but sometimes that".
Open a previous chat window with someone on the home page, press Ctrl + F and look for some text in the chat window. Finds it no problem.
Now close the search bar and go into a topic. Try doing the same thing. You get the in topic search instead, which won't search the modal.
Should probably default to browser search if the chat window is open.
EDIT: Hmm, can't repro now.