Need to add to public/postLocalSettings.d/override.php (or into LocalSettings???)
$wgNamespacesToBeSearchedDefault = [
NS_MAIN => true,
NS_PROJECT => true,
NS_FILE => true,
NS_HELP => true,
NS_CATEGORY => true
];
Checking the behaviour of the advanced search form on the demo site, it seems to find what you’re looking for (in the file namespace) on if FILE is checked /and/ you click another option (which seems to update the search parameters). See if this is a bug upstream, or a configuration problem.
https://www.mediawiki.org/wiki/Manual:$wgNamespacesToBeSearchedDefault
The default is just NS_MAIN