Depth in OpenGL is a separate 2D buffer. You can use it to approximate the effects of 3D space, but it’s still fundamentally a set of 2D operations.
Of course, it’s all fundamentally just bits on a heap, so past a certain point the argument becomes academic.