Its probably because line of sight doesn't work well with multiple instances.
Since this is platform, and you probably only need a single axis to compare, try the overlapping at offset condition. Like ranger is overlapping at offset enemy 30x 0y.
Then -30x 0y for the left side.
If you do need both axes then you can use distance(x1,y1,x2,y2), but you may need something else to pick.