The default size is 9. If you change it the issue occurs. This brings a visual glitch in the window. The title text is resized but the titlebar is not.
Note: This is reproducible only if the DPI is larger than 100%.
To work this around manually set the size of the titlebar element.
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
Grid windowDecorator = this.ChildrenOfType<Grid>().FirstOrDefault(x => x.Name =="MaximizeWindowDecorator");
RibbonTitleBarPanel ribbonTitlePanel = this.ChildrenOfType<RibbonTitleBarPanel>().FirstOrDefault(x => x.Name == "RibbonTitleBarPanel");
windowDecorator.RowDefinitions[0].Height = newGridLength(ribbonTitlePanel.ActualHeight);
}