I think the Viewport container internally uses a ViewportTexture, so using a viewport texture directly should work. I haven’t really used ViewportContainers myself, so I cannot do a direct comparison, but I have used ViewportTextures without issues.
One minor downside of using a ViewportTexture is the image may be flipped, but you can set a property in the Viewport to correct this.