       self.applyTransform(rate: self.isLargeState ? 0 : 1, corner: self.currentCorner, translate: .zero)
     }
   }
+  
+  @objc private func willChangeStatusBarFrame(_ notification: Notification) {
+    if currentCorner.verticalEdge == .bottom || isLargeState || isPanning { return }
+    UIView.animate(withDuration: 0.35) {
+      self.applyTransform(corner: self.currentCorner)
+    }
+  }
 }

  }
  
  private var isPanVectorVertical = true
  
  private func panChanged(_ sender: UIPanGestureRecognizer) {
    if isLargeState || !PictureInPicture.movable {

    NotificationCenter.default.addObserver(self, selector: #selector(bringToFront), name: .PictureInPictureUIWindowDidAddSubview, object: nil)
    NotificationCenter.default.addObserver(self, selector: #selector(addSubviewOnKeyWindow), name: .UIWindowDidBecomeKey, object: nil)
    NotificationCenter.default.addObserver(self, selector: #selector(orientationDidChange), name: .UIDeviceOrientationDidChange, object: nil)
    NotificationCenter.default.addObserver(self, selector: #selector(willChangeStatusBarFrame(_:)), name: .UIApplicationWillChangeStatusBarFrame, object: nil)
  }
  
  @objc private func bringToFront() {
