All modern games use the z-buffer. Including any GTA V.
And if you draw first near objects, then rendering is blocked z-buffer slice of the hardware to be clipped by the video card, and it is very fast. Fully drawn, they often will not.
Plus, the game will never be a situation with 99 polopoloonline trees on one line, except for z-buffer use and other technologies.
For example, thanks to LOD, the total number of polygons will be only very near objects, and the farther the object, the more low-poly version will be substituted instead. Instead of the most distant objects will generally be a flat image.
Thanks to the trees the visibility of the frame will get some of the objects that shouldn't be visible to the camera, they just will not be drawn, because the engine will understand that they are blocked from view.
There are ways to do without z-buffer. For example, for indoor use binary trees to draw walls in order from the near to the far.
Plus, for objects with transparency z-buffer to be used is generally impossible, we have to sort the faces and draw them in order from far to the middle, so that the transparency is correctly applied.
In short, the nuances of the car and small truck.
Suggest habré to read a series of posts "as rendered frame in the game n" https://habr.com/ru/company/ua-hosting/blog/271931/
there's quite a good show all the steps, including the z-buffer.