I have recently found a bug in sharing search queries that I wanted to share here.
Whenever someone shares a browse URL (search results) to someone while they are on Detail View, Jira automatically picks a task and include it in the URL. Note that, user cannot change that behavior and user thinks they are sharing a search URL not a task.
Then the task no longer matches the query, then the whole query becomes un-viewable. Jira just shows the task that no longer matches to the query without "Return to Search" button for people using "List View".
A user, using Detail view and intending to share a search query, cannot change this behavior, which is why this is a bug.
Repro steps:
Share a list of open tickets matching to a filter (say open tickets on you). Use Detail View while sharing your URL. In this case, Jira would pick the current selected task and add it to your URL.
Make sure second person opening this URL uses List View. Normally they would see the task and "Return to Search" button on the top right to see all the matching tickets along with the search query.
Close the picked task in that URL. Have the second person reopen the link, they won't see the "Return to Search" button. They would not be able to view the list.