Add filter post_where and passing post_type argument

Remove this part from your posts_where filter:

if (is_search() && get_search_query())

Note that is_search() is a check on the main query.

If you want to target the main search query, there’s the posts_search filter available.

Important: Watch out for possible SQL injections, as you are taking user input into the SQL query. I think the FILTER_SANITIZE_STRING filter is too weak here, as it allows e.g. parentheses, where it allows the user to modify the structure of the SQL query. Consider $wpdb->prepare() with %for %F type specifiers for floating point numbers.