It works. Only problem is, if you don't change the flying height of a unit instantly, but over time (using SetUnitFylHeight), GetUnitFlyHeight will return the final fly height of the unit even if the change hasn't finished yet.
GetUnitFlyHeight also returns incorrectly for transfer-height values over cliff-level changes and the flying height of units over destructables like forests. It only works correctly if you use a ground unit with the flying-unit-trick and then use SetUnitFlyHeight.
Ground units won't work correctly over water, you need to use floating units (or naval, you can always move them to unpathable terrain with SetUnitX/Y).