Ajax form submission error when using use-ajax-submit
The following dependencies need to be added to the library attached to the form in order to use use-ajax-submit.

my_module.libraries.yml

my_module.my_library:
  dependencies:
    - core/drupal.ajax
    - core/jquery.form


The library needs to be attached to the form:

$form['#attached']['library'][] = 'my_module/my_module.my_library';