Frequency modulation atomic force microscopy (AFM) allows the chemical structure of planar molecules to be determined with atomic resolution. Typically, these measurements are carried out in constant-height mode using carbon monoxide (CO) terminated tips. Such tips exhibit considerable flexibility, i.e., the CO molecule can bend laterally due to the tip-sample interaction. Using epitaxial graphene as a model system, we demonstrate experimentally that the apparent atomic positions measured by AFM depend on the sample corrugation. Using molecular mechanics simulations, we explain these observations by the interplay of the CO bending and the nonlinear background signal arising from the neighboring atoms. These effects depend nontrivially on the tip-sample distance and limit the achievable accuracy on the bond length determination based on AFM experiments.