Measurements of the Casimir–Lifshitz (dispersion) forces at distances below 50 nm are difficult due to the snap-in effect, and precision is poor due to increasing relative uncertainty in the distance. In this paper, a method of adhered cantilever that avoids the loss of stability is used to measure the interaction energy between Si and Ru surfaces in direct contact. Background capillary and short-range interactions are strongly suppressed because surface roughness significantly deviates from a normal distribution. Electrostatic interaction is not fully compensated, but the potential is limited to a value less than 29.8mV. Adhesion energy is measured directly, and the average equilibrium distance is predicted theoretically. The ability to achieve high precision in this type of experiment is demonstrated.