Which version of the app?
WinUI 3 Gallery
Description
In the FilePickerPage.cs there is the async void PickFolderButton_Click(object sender, RoutedEventArgs e) method:
[Line 187]
StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder);
If compiling as an unpackage application, this line throws an ArgumentException (see screenshot).
Screenshots

Windows version
Windows 10 22H2 (19045)
Additional context
No response