Invalid search request resets the project/group selections in sidebar

Summary

Sidebar navigation falls back to global when the search is not valid. For example, search is abusive.

Steps to reproduce

Perform a project-level advanced search with a stopword(like for)

What is the current bug behavior?

Left navigation bar project and group selections reset

What is the expected correct behavior?

Left navigation bar project and group selections should not get reset

Relevant logs and/or screenshots

Screenshot_2025-08-04_at_18.33.06

Possible fixes

Remove valid_request? check from https://gitlab.com/gitlab-org/gitlab/-/blob/6378b55c4498b893a42a8ce8d863a19ba251fb58/app/services/search_service.rb#L18