I got it working but it's a little complicated, I hope I can explain well. You need a second "fake" ViewportContainer and a "fake" Viewport as the child. Then make a Camera as a child of the Viewport. Check "Own World" on the "fake" Viewport and create a World right under. Set the Environment directly under to your "fake" Panorama. The "fake" ViewportContainer should be above the real one in the scene list so it is behind.
On the top of the script for your mouse do this to save the node name:
onready var fake = get_node("../../FakeContainer/FakeViewport")
Then in the click script use this line:
var view_texture = fake.get_texture().get_data()
It seems to work for me. The only issue I foresee is syncing the cameras up when the player looks around. I imagine it's just a matter of setting the "fake" Camera to have the transform of the real Camera each frame, but I haven't tried it. Hope that sets you in the right direction.