Hi,
I'm watching a lot of youtube on my phone (via the ReVanced client), so this issue appears more to me than to others probably - and it's not that bad, because I don't really need PiP and I just disable it. It appears on Netflix too. I'd suspect it's an upstream issue with AOSP. But it's been there for a long time.
If i switch from full-screen videos into PiP (by using gestures to go to the home screen for example) you can see it struggle performance-wise, elements animate to a wrong spot and then glitch into their correct one, if I try to move the PiP window it sometimes glitches to another spot. Also, the content of the PiP video sometimes contains squished together controls of the app.
The worst thing about that feature is though, that sometimes I can't go back into the app that started PiP (e.g. YouTube), if I click on the app in the activities overview it just won't open, and stays in that overview. If I don't click but rather enlarge it to the bottom of the screen with my finger, it swipes away to the side and the activities overview is closed. I can only make this go away by closing and reopening the app, which works. Until the issue happens again, which is frustrating if I regulairly swipe out and back in to chat in the background, or look something up.
Also, sometimes the navigation gesture bar appears on the wrong side of the screen (like left instead of bottom, even though the gestures only work when I start them from the place the bar is supposed to be). In my head I correlate that to the PiP mode, as it happens when I exit full screen video for example. I've had it in one game too though.
It feels like there hasn't been put much thought into it by Google - I'd image it's the same on the stock roms. I know this isn't a full-blown bug report, and I don't expect you to fix it.
This isn't a hate post, I looooove GrapheneOS and it's the reason I bought my Pixel, and I'm so happy about features like disabling of network and contacts and storage scopes. In the last few days, I also saw it gain a lot of performance or smoothness - but that might just be because I erased a few apps. I'm extremely happy altogether. Just that one feature feels sluggish, and I just disable it and don't care anymore. And if that's the kind of thing a grumpy guy like me worries about, you must've done a whole lot correctly. :-)
Thank you for your work. :-)