How to close modal after form submit?
You need to implement and use your own EntityEditForm - is this the case ?
Then skip to the last code block :D

Otherwise you'll need to accomplish this first.
See this answer (Overriding an entity add/edit form through alterroute) for an approach to 'inject' a custom form. Here the crucial code to it (adapted to NodeForm):

modules/custom/form_overwrite/form_overwrite.services.yml

services:
    route_subscriber:
        class: Drupal\form_overwrite\Routing\RouteSubscriber
        tags: 
 - {name: event_subscriber }


modules/custom/form_overwrite/src/Routing/RouteSubscriber.php

 &lt;?php

/**
 * @file
 * Contains \Drupal\form_overwrite\Routing\RouteSubscriber.
 */

namespace Drupal\form_overwrite\Routing;

use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;

/**
 * Listens to the dynamic route events.
 */
class RouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  protected function alterRoutes(RouteCollection $collection) {
     if ($route = $collection-&gt;get('entity.node.edit_form')) {
  $route-&gt;setDefault('_entity_form', '\Drupal\form_overwrite\Form\NewEditForm');
     }

   }
}


modules/custom/form_overwrite/src/Form/NewEditForm.php

&lt;?php

namespace Drupal\form_overwrite\Form;

use Drupal\node\NodeForm;


/**
 * Form handler for the node edit forms.
 */
class NewEditForm extends NodeForm {}


There you make sure the #ajax is set, like:

&lt;?php

public function form(array $form, FormStateInterface $form_state) {
   ...
   $form['actions']['DESIRED_EXISTING_ACTION'] = array(
      ...
      '#type' =&gt; 'submit',
      '#ajax' =&gt; array(
        'callback' =&gt; '::ajaxSubmit',
        'event' =&gt; 'click',
      ),
      ...
    );
   ...
}


and overwrite the ajaxSubmit function, adding the CloseModalDialogCommand, like:

public function ajaxSubmit(array &amp;$form, FormStateInterface $form_state) {
    $response = new AjaxResponse();

    if ($form_state-&gt;getErrors()) {
      ...
    }
    else {
      ...
      $response-&gt;addCommand(new \Drupal\Core\Ajax\CloseModalDialogCommand\CloseModalDialogCommand());
    }

    return $response;
  }