Not sure if it would work right off, but you could use a TextureRect node instead of a Viewport container. You just need to get the ViewportTexture from the Viewport node and set it to the texture
property of the TextureRect. Something like this:
$TextureRect.texture = $Viewport.get_texture()
I'm not 100% sure it would work around the limitation, but that would be what I would try to work around the container issue.