Same issue happens by just using Accessibility on macOS, like accessibility inspector or Voice Over, not only in UI Tests.
To reproduce:
open your sample app
open accessibility inspector
focus on the current app view in inspector
navigate away
see object graph showing previous view model is not released
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: