Twig search function doesn't work after upgrading to Craft 3
The search parameter relies on the internal search index (whereas your other approach does not).
It's possible that something got tripped up during a migration to Craft 3, perhaps when the new drafts &amp; revisions system was introduced.
Try rebuilding your search index. It might take a long time to run, but should hopefully solve your problem.