TL/DR
I haven't found any documentation related to the below subject regarding UIScene notifications for PiP video that seem to have appeared since iOS 18. Is there any, or has it been mentioned, like at WWDC or elsewhere?
Details
There seems to have been a change in how scene notifications are sent between iOS 17 and iOS 18 (give or take a few minor releases, since I haven't figured exactly when this change appeared).
From iOS 18 and onwards, it seems that these notifications are not only sent for an iOS app itself when moving to foreground/background, but we also receive the notifications for PiP video "scenes" going into foreground/background.
- UIScene.willEnterForegroundNotification
- UIScene.didEnterBackgroundNotification
So (from iOS 18) when your app is playing video and you move the app to background, and the PiP video appears, you will likely receive these notifications:
- UIScene.willEnterForegroundNotification