When using the search box in List view, any relevant subtasks should also show, even if the view is not set to show subtasks as separate tasks.
Showing subtasks as separate tasks is often impractical to use (it's busy, cluttered, and does not provide any hierarchy), so is only used infrequently.
It's also impractical and slow to change the subtask showing option to "show separate" just to perform a search.
But I still want to be able to search for subtasks and within subtasks on views that have them collapsed.
It would be great if subtasks showed if they would be relevant to the search - maybe expanded under their parent task, or maybe just as separate tasks with a breadcrumb showing.
You could have a toggle in the search, if you feel its necessary, saying "also show subtasks". Although i personally feel they should just show regardless.