GtkOffscreenWindow is strictly intended to be used for obtaining snapshots of widgets that are not part of a normal widget hierarchy. Since #GtkOffscreenWindow is a toplevel widget you cannot obtain snapshots of a full window with it since you cannot pack a toplevel widget in another toplevel.
Fluent builder for gtk.offscreen_window.OffscreenWindow
Fluent builder implementation template for gtk.offscreen_window.OffscreenWindow
Module for OffscreenWindow class