There is a slight change in the order that configuration is installed during a site install. Optional configuration provided by installed modules will be created before the install profile is installed. This change allows optional configuration in a profile's config/optional directory to depend on optional configuration provided by modules.
If your install profile has added an install step to call \Drupal::service('config.installer')->installOptionalConfig(); again to ensure all optional configuration is installed, it can be removed.
This change can result in breaks if your install profile's install hook assumes that optional configuration will only be installed afterwards. For example, if your install profile is creating content blocks and also configuring their block placements it is likely that the change will result in the block placements being created before the content blocks. A possible fix is to move the content creation to hook_modules_preinstall(). For example, in the Umami demo we moved the content creation to a preinstall hook:
/**
* Implements hook_module_preinstall().
*/
function demo_umami_content_module_preinstall($module) {
if ($module === 'demo_umami_content' && !\Drupal::service('config.installer')->isSyncing()) {
// Run before importing config so blocks are created with the correct
// dependencies.
\Drupal::classResolver(InstallHelper::class)->importContent();
}
}