I found a solution/workaround for the view dismissing issue by manually setting the navigation view style on the main NavigationView to .stack.
This was that solution to another error I had in my log from this thread: https://developer.apple.com/forums/thread/673113
I still get the 'kCFRunLoopCommonModes' error when I use the toggle but the view no longer dismisses.
Post
Replies
Boosts
Views
Activity
@swiftaero If you look at the comment on my post below you will see that I found a fix/workaround for my issue of the view dismissing by manually setting the navigation view style to .stack. I don't know if that would fix your issue with the sheet dismissing but hopefully it helps point you in the right direction.