Understanding the nanoscale electrostatic interaction between a conductive atomic force microscopy (AFM) probe and a dielectric film is central to the operation of various nanoscale dielectric microscopies and determination of dielectric properties of the film. There is no simple analytical description of the electrostatic interaction generated in the confined probe-sample geometry for neither static nor dynamic AFM modes used in dielectric measurements. An accurate description of the involved physics is obtained only by means of a finite element analysis modeling of the system. However, the alternative to using the numerical analysis is not very popular due to being slower and requiring relatively high computation resources. In this work, we revised the contributions from different parts of the AFM probe to the probe-sample capacitance by both analytical and numerical methods. We tried to reconciliate the two approaches and observed the differences as a function of geometry and material parameters. Under various noise levels, the efficiency of an analytical model was tested against a finite element analysis that captures in detail the electrostatic interaction in AFM-based dielectric measurements. The investigation was performed in both spectroscopic force-distance curves and constant height scans with measurements for deflection and frequency of the AFM probe. The obtained measurement sensitivities are relevant in selecting the optimal scanning mode and its operational parameters for a given film thicknesses and dielectric constants but also show the critical role of the numerical analysis to the correct interpretation of the measurements.