Vlad
If your phone is in portrait mode and you full screen a video on YouTube, Safari remains in portrait mode. Safari does not automatically flip orientations.
If you do choose to create this feature, it should not be turned on by default and should be a toggle.
The reason for not defaulting is there are users who want to just enable PIP video by full-screening. There should not be any reason for the user to have their phone orientation flipped automatically when they just wanted to quickly fullscreen a video to enable PIP.