Index: profile.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- profile.module	(revision c4d1ad2fddfb801d714bcecca784d8cc0ddb8083)
+++ profile.module	(revision )
@@ -205,6 +205,22 @@
         '#weight' => ++$weight,
         '#open' => TRUE,
       ];
+
+      // @see https://www.drupal.org/node/2871480.
+      if (\Drupal::moduleHandler()->moduleExists('field_group')) {
+        $context = [
+          'entity_type' => $profile->getEntityTypeId(),
+          'bundle' => $profile->bundle(),
+          'entity' => $profile,
+          'context' => 'form',
+          'display_context' => 'form',
+          'mode' => 'default',
+        ];
+
+        field_group_attach_groups($form['entity_' . $profile_type->id()], $context);
+        $form['entity_' . $profile_type->id()]['#pre_render'][] = 'field_group_form_pre_render';
+      }
+
       $form_state
         ->get('form_display_' . $profile_type->id())
         ->buildForm($profile, $form['entity_' . $profile_type->id()], $form_state);
