I have been using the method outlined in the following example to add an observer offset:-
https://community.esri.com/t5/arcgis-api-for-javascript-questions/offset-to-observer-height-with-line-of-sight/m-p/27319/highlight/true#M2359
In the latest 4.25 release, the observer property no longer contains a valid value for z when used over terrain, it only returns the value 0. Thus, when creating an updated observer point based on an offset and the observer value, the new observer point is underground (or 0 + offset)
The z-value is correct when over a model or mesh.