Depth dependence of the spatial resolution in scanning transmission electron microscopy experiments