title: TabBar visibility issue after window root change
body: <p>After entering to the foreground I am performing a request, during which I am changing the root view controller of the main window to a fake launch screen like view controller, temporarily keeping the current root(which is tab bar controller with nested nav controllers), after performing the request, based on the response I am swapping the root back with the temporarily saved &quot;old&quot; root view controller(the tabor controller)</p>
  <p>after the swapping with the old root, the tabor shows up in inner pages where hidesBottomBarWhenPushed is set to true, tabor disappears correctly after any push or pop  transitions</p>
  <p>I have already refactored this bit to a simpler and smarter one, but my question still exists, what happens? and why does tab bar show up on a VC with hidesBottomBarWhenPushed set after root swap</p>
  <p>Here is some of that code:</p>
  <pre><code>private func animateRootChange(to viewController: UIViewController, _ completion: ((_ completed: Bool) -&gt; Void)? = nil) {
      guard let window = window else { return }
      
      window.rootViewController = viewController
      
      UIView.transition(with: window, duration: 0.3, options: .transitionCrossDissolve, animations: nil) { (completed) in
          completion?(completed)
      }
  }
  
  
  func sceneWillEnterForeground(_ scene: UIScene) {
      guard let window = window,
            let currentRoot = window.rootViewController else {
          return
      }
              
      animateRootChange(to: LaunchScreenViewController(), nil)
      
      TheRequestWithFunctionCall { [weak self] (model: ForceUpdate) in
          guard let self = self else { return }
          
          aBoolean ? self.animateRootChange(to: currentRoot, nil) : self.animateRootChange(to: LogInViewController(), nil)
  
      } failure: { [weak self] (_) in
          
      }
  }
  </code></pre>