I tried to put in lock and unlock, but it didn't help.
var image = vp_texture.get_data()
image.lock()
print(image.data["data"].hex_encode())
var image_texture = ImageTexture.new()
image_texture.create_from_image(image)
image.unlock()
To lock the image, it must first exist. And it get's created in the vp_texture.get_data() call. However, the error seems to be in that function, get_data(), since it returns all zeros. And get_data() is a function of the ViewportTexture class, to retrieve (supposedly) the bytes making up the texture drawn on the viewport canvas.
The Image class also has a get_data() but that's just a getter for it's data poperty.
I think lock (and unlock) is only used in conjunction with the Image functions set_pixel and get_pixel, in order to manually set the content of the image.