How to realize ajax on a form element with autocomplete
I managed to find the solution.
My code works with an event "autocompleteselect".

Here's an example of code

$form['autocomplete_field'] = [
            '#type' =&gt; 'textfield',
            '#title' =&gt; t('Autocomplete search'),
            '#autocomplete_route_name' =&gt; 'autocomplete_route',
            '#ajax' =&gt; [
                'callback' =&gt; '::ajaxFunctionAfterAutocomplete',
                'event' =&gt; 'autocompleteselect',
            ]
        ];