Quantifying magnetic field driven lattice distortions in kagome metals at the femtometer scale using scanning tunneling microscopy