Sn-phthalocyanine adsorbs on Ag(111) in a physisorbed or a chemisorbed configuration. Both structures are contacted with the tip of a combined scanning tunneling and atomic force microscope. The tunneling conductances of both configurations exhibit similar exponential variations with the tip-molecule distance. The short-range forces, however, display nontrivial distance dependencies. First-principles calculations reproduce the experimental results. Both attractive and repulsive interactions occur between the tip and different parts of the molecule due to a combination of bond formation and electrostatic interactions with the tip electric dipole. Consequently, deformations occur and the force varies in the resulting unexpected fashion.