Add and edit nodes using the main theme
You can configure this in UI, see the checkbox at the end of the theme list in /admin/appearance:


  [x] Use the administration theme when editing or creating content


This config option is then used to alter the route in the following code example, which would also answer how to alter the route in a route subscriber:

NodeAdminRouteSubscriber::alterRoutes()

  protected function alterRoutes(RouteCollection $collection) {
    if ($this-&gt;configFactory-&gt;get('node.settings')-&gt;get('use_admin_theme')) {
      foreach ($collection-&gt;all() as $route) {
        if ($route-&gt;hasOption('_node_operation_route')) {
          $route-&gt;setOption('_admin_route', TRUE);
        }
      }
    }
  }


More info https://www.drupal.org/docs/8/api/routing-system/altering-existing-routes-and-adding-new-routes-based-on-dynamic-ones