THz scattering-type scanning near-field optical microscopy (THz s-SNOM) enables high-resolution nanoscale 2D imaging, crucial for various disciplines including biology, physics, and materials science. This study establishes a reliable 3D model to determine the maximum thickness detectable by the probe. The influences of the demodulation order, tip radius, tip vibration amplitude, and incident frequency on the maximum detectable thickness are analyzed. Using bilayer samples as examples, we successfully inverted the thickness of the first layer within the detectable maximum depth range. However, we found that inversion fails when the thickness of the first layer is too small. This underscores the distinct difference between vertical and lateral resolutions, where vertical resolution represents the minimum calculable thickness. This research unveils complex internal structures, laying the groundwork for future nanolayer imaging.