Alright, I’ve figured it out.
When doing 2d convolution, the filter moves in only 2 directions (H & W) of the image. That’s why the operation is called 2d convolution although a 3d filter is used to process 3d volumetric data.
In 3d convolution we also use a 3d filter to process 3d volumetric data, but we move in 3 directions (H, W & D).
It was confusing to me to use a 3d filter in 2d convolution, but the aforementioned explanation should clarify the difference.