Instead of Python Annotation only, you can use Programmable Filter to compute both volume and surface area from the full and extracted dataset.
First, click the original dataset in the Pipeline Browser, then Ctrl-click the Extract Surface Filter, so you have two selected filters in the browser. Now add a Programmable Filter with the following script:
from paraview import vtk
height = sum(volume(inputs[0]) * (alphaphase1 >= 0.8)) / sum(area(inputs[1]))
output.FieldData.append(height, "height")
Finally, add a Python Annotation with Array Association set to “Field Data” and Expression set to height[0]
.