I've tried three cubes with different height, and render the height map in Render View Image, the upper one is the height map, the lower one is a plane with the rendered height map.
From top-down view,
From side view
My question is why there is no difference when the height map is applied, my node steup is like this,
Edit:Slope doesn't help too much for the height, I can't tell the difference either.