9 – How to alter routes defined in route_callbacks?

Usually I alter static routes in routes subscriber:

  protected function alterRoutes(RouteCollection $collection) {
    $route = $collection->get('gutenberg.media.load_media');
    if ($route) {
      $route->setDefault('_controller', 'Drupalgutenberg_advControllerMediaController::loadMedia');
    }
  }

However I this does not work for routes defined in routes_callback, so this does not work for search route for example:

$route = $collection->get('search.view_node_search');
if ($route) {
  $route->setDefault('_controller',
      'Drupalwi_miscControllerSearchController::view');
}

So how to alter search route controller?