In that case, the molecule may be adsorbed on the hollow site of Au surface, rather than the top site of Au surface. So the adsorption height is not equal to the distance of Au-S. If the molecule is adsorbed on the hollow site of Au(111) surface (used as electrode), the relationship between the Au-S distance and the adsorption height will be:
the Au-S distance = sqrt[ (the adsorption height)^2 + 1/3 (the Au-Au distance in Au(111) surface)^2 ]
For a given adsorption height, the Au-S distance can be measured by picking up Au and S atoms.