In the TabCaptureRegistry code (of all places!), we have a "WindowAdoptionAgent" class that ensures a captured WebContents is always present in the aura::Window hierarchy. This was originally put in place to allow tab capture to continue on hidden tabs, whenever they were removed from the UI hierarchy. When the RenderWidgetHostView's native view was removed from the UI hierarchy, the compositor would no longer generate frames, and thus not execute any of the CopyOutputRequests needed for capture.
Ref: https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc?rcl=36a8495f6a1487c3f549f833e749e0747ac3d53c&l=50
Nowadays, we have a new viz::mojom::FrameSinkVideoCapturer (impl at src/components/viz/services/frame_sinks/video_capture/*) that *might* no longer need this hack. In fact, even if the hack is still required, we should change this design. Instead, we should be driving compositing by using an offscreen viz::Display.