Repository: microsoft/PowerToys
File: src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariablesXAML/MainWindow.xaml.cs (C#)

Code before:
using EnvironmentVariablesUILib.Helpers;
using EnvironmentVariablesUILib.ViewModels;
using ManagedCommon;
using Microsoft.UI.Dispatching;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using WinUIEx;

namespace EnvironmentVariables
{
    public sealed partial class MainWindow : WindowEx
    {
        private EnvironmentVariablesMainPage MainPage { get; }

        public MainWindow()
        {
            this.InitializeComponent();

            ExtendsContentIntoTitleBar = true;
            SetTitleBar(titleBar);

            AppWindow.SetIcon("Assets/EnvironmentVariables/EnvironmentVariables.ico");
            var loader = ResourceLoaderInstance.ResourceLoader;
            var title = App.GetService<IElevationHelper>().IsElevated ? loader.GetString("WindowAdminTitle") : loader.GetString("WindowTitle");
            AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall;

            Title = title;
            titleBar.Title = title;

            var handle = this.GetWindowHandle();
            RegisterWindow(handle);

            WindowHelpers.ForceTopBorder1PixelInsetOnWindows10(handle);
            WindowHelpers.BringToForeground(handle);

            MainPage = App.GetService<EnvironmentVariablesMainPage>();
        }

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            MainGrid.Children.Add(MainPage);
            Grid.SetRow(MainPage, 1);
        }

        private static readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
        private static NativeMethods.WinProc newWndProc;
        private static IntPtr oldWndProc = IntPtr.Zero;

        private void RegisterWindow(IntPtr handle)
        {

Review comment (suggestion):
Same. This shouldn't be Tall. Even _if_ there were an (interactive) control in the title bar, I believe the control will handle that by itself.

Code after:
using EnvironmentVariablesUILib.Helpers;
using EnvironmentVariablesUILib.ViewModels;
using ManagedCommon;
using Microsoft.UI.Dispatching;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using WinUIEx;

namespace EnvironmentVariables
{
    public sealed partial class MainWindow : WindowEx
    {
        private EnvironmentVariablesMainPage MainPage { get; }

        public MainWindow()
        {
            this.InitializeComponent();

            ExtendsContentIntoTitleBar = true;
            SetTitleBar(titleBar);

            AppWindow.SetIcon("Assets/EnvironmentVariables/EnvironmentVariables.ico");
            var loader = ResourceLoaderInstance.ResourceLoader;
            var title = App.GetService<IElevationHelper>().IsElevated ? loader.GetString("WindowAdminTitle") : loader.GetString("WindowTitle");

            Title = title;
            titleBar.Title = title;

            var handle = this.GetWindowHandle();
            RegisterWindow(handle);

            WindowHelpers.ForceTopBorder1PixelInsetOnWindows10(handle);
            WindowHelpers.BringToForeground(handle);

            MainPage = App.GetService<EnvironmentVariablesMainPage>();
        }

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            MainGrid.Children.Add(MainPage);
            Grid.SetRow(MainPage, 1);
        }

        private static readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
        private static NativeMethods.WinProc newWndProc;
        private static IntPtr oldWndProc = IntPtr.Zero;

        private void RegisterWindow(IntPtr handle)
        {
            newWndProc = new NativeMethods.WinProc(WndProc);