WP_user_query throws a 404 error

pre_user_query is called after the query variable object is created, but before the actual query is run. Your code is creating a new query within the action when you should actually modify the existing query’s arguments using the $query->set() method. For example:

function my_pre_user_search($user_query) {
  $meta_query = array(array(
    'key' => 'member_id',
    'value' => '2349'
  ));
  $user_query->set('meta_query', $meta_query);
}
add_action('pre_user_query','my_pre_user_search');