Parameter 2 to App\advanced_custom_search() expected to be a reference, value given

I may miss something, but as far as I can see, there doesnt seem to be any reason to pass $wp_query by reference since there is no alteration of it within the function.

So try removing the &-sign from the second argument passed to advanced_custom_search()

You can read about passing arguments by reference here: https://www.php.net/manual/en/language.references.pass.php

If you are looking to improve the search functionality you may want to take a look at https://www.relevanssi.com/ which can handle ACF and much more.