That will unfortunately not work with the recent fixes to xwidgets (or
display in multiple Emacs windows in the old implementation), as you
can't render a GtkSocket in an offscreen window.
Do we have to necessarily use off-screen rendering? Are you referring to some problem with the scenario as in the attached pic? Can you elaborate?

embed5.png