@collinktx - your code will work for a maximum limit of 2000 rows. Remember, a delegation warning is just a warning, not an error.
The Search function is not a delegable function in SharePoint, but you could use the StartsWith function, which is delegable. However, StartsWith is delegable only with Text types. Another more obvious drawback is that this function only returns matching values based off the start of the search text.

There are no workarounds for functions which are not delegable. You can hide the message with workarounds, but the delegation will persist. However, the Filter function is delegable with SharePoint. If you can pre-filter your lists (such as using the With function) based on a specific criteria that will return less than 2,000 rows, you can then perform a Search function on that smaller subset of data. For example we could have population data that has 10,000 rows of people per district, but if we know that each neighbourhood within those districts will return less than 2,000 rows, it is ok to use a non-delegable function within that smaller subset using delegable Filters.
Further reading:
https://www.practicalpowerapps.com/delegation/with-statement-managing-delegation/
https://learn.microsoft.com/en-us/connectors/sharepointonline/#power-apps-delegable-functions-and-operations-for-sharepoint
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
Imran-Ami Khan