There's no conflict. The aim isn't random. The only thing that's random is which eyes activate this turn. So what if it takes a little longer to dig because you're waiting for a disintegration ray? The tunnel still gets dug.
Longer to dig? That's silly.
When a rule is so bad it requires an explanation like this, it's time to replace the rule.
The Computer Programmer analogy of this is:
Computer Programmer: "Yeah, I don't know which finger is going to type a key next, but I know it will be one of the ten. I can usually get a line of code written every 15 minutes or so, but it's mostly trying to get as many fingers as possible on the backspace key when they screw up."
The Beholder analogy of this is:
Beholder : "Yeah, I don't know which eye is going to fire off next, but I know it will be one of the ten. I can usually get a minion charmed every 15 minutes or so, but it's mostly trying to Fear all of the candidates back into the lair when I disintegrate, or finger of death, or flesh to stone one of them and they all keep running away. It's worse than herding cats."
Having an iconic D&D creature do random attacks is just plain silly. The issue is that the earlier Beholders had a type of facing. Just reintroduce that.
Assign the 10 eyestalks to 10 arcs of attack.
Use a 12 sided die. Numbers 1 to 10 results in 10 specific spells where each Beholder has them randomly selected. But once selected, they are permanent.
Numbers 11 and 12 are the AntiMagic ray eye (or if you have a 12-sided that does not have 11 and 12 next to each other, pick two other adjacent numbers for the antimagic ray).
This way, the Beholder moves in and might get 5 or 6 rays on foes, but typically only one or two on any given foe. Or if it is at long range, it might only get 2 rays total. Orient the Beholder any way you want and elevate it to get good angles of fire, but fire all of the rays simultaneously (which prevents the Beholder from shooting all 10, or alternatively some other max number, but the best ones).
This has another advantage. There is no random dice rolling (and associated waste of time). The DM orients the 12 sided "Beholder" die and whichever rays face whichever PCs, those are the ones that can fire (note: they can fire, they do not have to fire).
This type of solution also makes sense. If the Charm Person eyestalk is facing backwards and the Beholder wants to keep its antimagic eye forward, then the only thing it can do against a foe behind it is Charm Person (or possibly one of the other semi-rear facing stalks on occasion).