How do I set the title tag for the maintenance page?
TEMPLATE_preprocess_maintenance_page changes only variables for maintenance-page.html.twig. But &lt;title&gt; is outputted in html.html.twig, so you have to choose another preprocessor template_preprocess_html. So you can use this code(don't forget to clean cache after it):

function mytheme_preprocess_html(&amp;$variables) {
  $maintenance_mode = \Drupal::state()-&gt;get('system.maintenance_mode');
  if (!empty($maintenance_mode)) {
    $variables['head_title'] = (string)t('My Custom Maintenance Title');
  }
}