It is not a desirable outcome, just a ‘side effect’ of how things are drawn…
I do not understand completely how this works, but some Overlays are drawn nearer to you than Objects.
You can play with the far clipping distance and make the default cube disappear but still see some of the Overlays:



Like I said, this is not done for practical purposes, it’s just the way things are;)