Generate drupalSettings in Ajax Callback
Well, I'm answering my own question. The secret is to use BubbleableMetadata. Here is my code explaining what I did and how it happened. Here is my entire controller response that generates the JSON for the response:

 public function ajax_callback($type)
 {
    // Retrieve the form
    $form = \Drupal::service('form_builder')-&gt;getForm('Drupal\path\to\Form');

    // Render the form
    $rendered_form = render($form);

    // Get the data from BubbleMetaData
    $data = BubbleableMetadata::createFromRenderArray($form);
    // Retrieve the attachments from the $data
    $attachments = $data-&gt;getAttachments();

    // Generate the settings to be sent back with the ajax response
    if(!empty($attachments['drupalSettings']))
    {
        $settings .= '&lt;script type="text/javascript"&gt;jQuery.extend(drupalSettings, ';
        $settings .= Json::encode($attachments['drupalSettings']);
        $settings .= ');&lt;/script&gt;';
    }

    // Send back the rendered form along with the settings
    $response = [
        'content' =&gt; $rendered_form . $settings,
        'status' =&gt; TRUE,
        'type' =&gt; $type,
    ];

    // Return the data as a JsonResponse
    return new JsonResponse($response);
}