SampleHeightMostDetailed for non-WGS84 ellipsoids

I am using Cesium to generate tabletop-style 3D visualizations of the Earth, Mars, and Moon. To determine the correct height for a given region, I sample some points along the edge of the visualization, determine their lat/long coordinates, then use SampleHeightMostDetailed to determine the height of the terrain above the ellipsoid and adjust accordingly. This works very well for the Earth, and returns height in meters with expected values.

When using other ellipsoids such as the Moon and Mars, I specify the ellipsoid in the Cesium Georeference and have no issues converting between ECEF and lat/long. However when I sample the height via the 3D tileset, it appears to still calculate this using WGS84 despite its georeference using a different ellipsoid (for example, sampling a lat/long on the moon may give a height of -4 million meters.

The visualization and most other features seem to work fine with a custom ellipsoid so I am wondering if this is a bug in the height sampling, or if there is some other way to sample terrain height with a specified ellipsoid.