How is $form['#action'] encoded?
The form action url is placeholdered to make the form cacheable when used on different pages:

Drupal\Core\Form\FormBuilder::prepareForm

  public function prepareForm($form_id, &amp;$form, FormStateInterface &amp;$form_state) {
    $user = $this-&gt;currentUser();

    $form['#type'] = 'form';

    // Only update the action if it is not already set.
    if (!isset($form['#action'])) {
      // Instead of setting an actual action URL, we set the placeholder, which
      // will be replaced at the very last moment. This ensures forms with
      // dynamically generated action URLs don't have poor cacheability.
      // Use the proper API to generate the placeholder, when we have one. See
      // https://www.drupal.org/node/2562341. The placeholder uses a fixed string
      // that is Crypt::hashBase64('Drupal\Core\Form\FormBuilder::prepareForm');
      $placeholder = 'form_action_p_pvdeGsVG5zNF_XLGPTvYSKCf43t8qZYSwcfZl2uzM';

      $form['#attached']['placeholders'][$placeholder] = [
        '#lazy_builder' =&gt; ['form_builder:renderPlaceholderFormAction', []],
      ];
      $form['#action'] = $placeholder;
    }


The placeholder is replaced before the cached page is delivered to the client. See FormBuilder::renderPlaceholderFormAction and FormBuilder::buildFormAction

The confusion in your debugging attempts is caused by placeholders being replaced not only in rendered forms, but also in debug output you put on the page via kint() or print.