It seems like it’s current limitation of grease pencil that it’s selection is based on the bouding box instead of it’s silhouette. that’s why it may seem like it selecting random grease pencil object while really it is selecting the one which’s bounding box is in the front.
it sounds like a missing feature to select by grease pencils silhouette. there is no problems like that with 3d mesh as it has faces to click at. Grease pencil object is quite new.
I don’t think there is a way to make it work as expected but there is a way to make it less confusing.
in object’s properties there is Viewport display tab and under it there is boundry option.
it should show objects bounding box around it so you can see what is going to be selected if you click in the air XD