The problem seemed to be the usage of the package Microsoft.Maui.Controls.Compatilibility. Once I replaced that with the package Microsoft.Maui.Essentials (which is MAUI's equivalent of Xamarin's Xamarin.Essentials) everything was working again as expected.