Understanding the effect of confinement in scanning spreading resistance microscopy measurements