After the user enters the text to search and presses ENTER or executes a saved search, the search pane changes its visibility from true to false according to the event listener for visibilitychanged. However, the search pane stays visible!
Did some more testing. This behaviour is only observed when the app has not registered a querysubmitted event handler but instead uses search activation to handle the entered text. It seems that Windows activates the app if it does not have a querysubmitted
handler registered.
With a propery querysubmitted handler the search pane does indeed not change its "visible" property unless the user light dismisses it.