The reCaptcha module adds a Javascript with hook\_captcha(). I want to add another attribute "type" to this script tag. I can't find a hook to achieve this.

Here is the code from the recaptcha.module (line 118):

```
$captcha['form']['recaptcha_widget'] = [
        '#markup' => '<div' . new Attribute($attributes) . '></div>',
        '#suffix' => $noscript,
        '#attached' => [
          'html_head' => [
            [
              [
                '#tag' => 'script',
                '#attributes' => [
                  'src' => Url::fromUri($recaptcha_src, ['query' => ['hl' => \Drupal::service('language_manager')->getCurrentLanguage()->getId()], 'absolute' => TRUE])->toString(),
                  'async' => TRUE,
                  'defer' => TRUE,
                ],
              ],
              'recaptcha_api',
            ],
          ],
        ],
      ];

```

When I try to access the script tag with e.g. hook\_page\_attachments\_alter() or any other hook\_preprocess\_xxxx() it is missing. I also tried to increase my module weight.