Configuring a query result you only want to show when displaying the result is done by using a related map view or the option show only with search result. It is not possible to use both configurations at the same time, so if configured, the related map view will be ignored.
If you want to provide a dynamic map view change for your user and you want to display the layer only with the search result, the layer has to be part of the map views and has to be defined as visible explicitly. See chapter Representation Models/Map Views for details.