I solved this by explicitly removing the child view controllers before deallocating the UITabBarController:
window.rootViewController?.children.forEach { $0.removeFromParent() }
window.rootViewController = MyNewRootView()
Topic:
App & System Services
SubTopic:
Core OS
Tags: