How to check "Show as expanded" by default on the Add menu item page
To set a default value for the menu link entity use hook_ENTITY_TYPE_create:

use Drupal\menu_link_content\MenuLinkContentInterface;

/**
 * Implements hook_ENTITY_TYPE_create() for menu_link_content.
 */
function mymodule_menu_link_content_create(MenuLinkContentInterface $menu_link_content) {
  $menu_link_content-&gt;expanded-&gt;value = 1;
}