Unity Editor seemingly picks object at random when multiple objects overlap; why not just the foreground?

When I’m editing a 2D UI view and have multiple objects overlapping, Unity seems to pick an object at random or even worse, prioritize objects in the back first, before moving to the front. Currently my muscle memory is to just click 10 times every time I want to select something. Sometimes, I click too many times and it cycles through and I have to click 5 more times.

I assumed this was just due to my own ignorance about how to use Unity, and there must be some easy setting to make it prioritize the foreground elements. However, today I decided to search for an answer and found nothing but an old forum post in which many people complained about this but it was never fixed and the thread was locked!