The solution demonstrates a problem of Maui Community Toolkit with the latest MAUI nightly build (8.0.20-nightly.10376+sha.402fdf7fcc-azdo.9307199).
The call to statusBarBehavior.SetAppThemeColor
in line 17 of AppShell.xaml.cs causes a NullReferenceException.