I would not even mess with this level of rulings.
I would make two simple rules:
1) Beholder spells works like every other caster's spells. Darkness or Invisibility does not defeat their spells.
2) Beholder eyes are not random.
Why in the world would a DM allow himself to be handicapped by such stupid monster design decisions by a faceless game designer? Take control of your game and get rid of the nonsense rules (like Concentration limited to a single spell, or Attunement which has zero need in a game where the DM controls the magic item acquisition).
I find it odd that so many DMs want to play the game "exactly as written".
Take control of your game and make it "your game".
Ignore nonsensical rules.
I'm going to ignore the rule. I've never seen a mistake of this magnitude. The beholder is on the friggin cover of the Monster Manual and the designer didn't notice something like random eye rays and needs to see target being a major problem. It's pretty unbelievable to me. Have you ever seen a design mistake of this level on a monster featured on the front cover of the book they're in? One of the most iconic D&D monsters? I haven't. It kind of boggles my mind. Minor oversights you can understand. One of this magnitude I don't think I've seen before.