Understanding Aperture – camera fundamentals
The closer you are to your subject, the shallower your DoF. This applies even when shooting the same focal length and same f-stop. When shooting with a closeup lens like the 105mm at f/16 your DoF at the minimum close focus distance may be just a few millimeters while using the same lens and f-stop with your subject 10m away may allow a DoF of around a meter.
This is the banded snail eater Sibon longefrenis shot at very close range with a 105mm macro lens. I am just a few centimeters from it. Even at the very small aperture of f/20 it is difficult to get more than just the snakes eye sharply in focus – an range of just a couple millimeters.