Damn, Wicht beat me to the punch (and much more thoroughly) for my Mirrors idea. Nonetheless, I would also say you could opt for panes of thick glass-like substances that the characters might have to break or work around, but don't inhibit the eye rays.
Can't remember off the top of my head, but I think in 5e they statted up a fungus that imitates a beholder and explodes in toxic spores when damaged, and especially for new players it is really the go-to "gotcha", especially if placed in an area where they might think they're beholder spawn or some such.
Another idea is to have traps that are latent and/or harder to detect until the beholder acts on them. A column might seem stable, and is, until the beholder uses its disintegrate ray on it to trigger the trap.
Another devious trick is to exploit the admittedly quite abuse-ready central eye feature, the anti-magic zone. The potential here is endless, but one easy idea is to use it to selectively suppress ongoing magical effects in the environment. An example would be a room of the lair with reversed gravity, the beholder can use his central eye to quickly toss the players about and disorient them.
Lastly, remember that the legendary actions of the beholder allow it to snipe with eye-rays at the end of opponent's turns, so if they try and soldier through the hazards/traps you can try and crowd control them as punishment. Even if you only do it once, chances are the rest of the group will play it safer, which buys the beholder more time.
Can't remember off the top of my head, but I think in 5e they statted up a fungus that imitates a beholder and explodes in toxic spores when damaged, and especially for new players it is really the go-to "gotcha", especially if placed in an area where they might think they're beholder spawn or some such.
Another idea is to have traps that are latent and/or harder to detect until the beholder acts on them. A column might seem stable, and is, until the beholder uses its disintegrate ray on it to trigger the trap.
Another devious trick is to exploit the admittedly quite abuse-ready central eye feature, the anti-magic zone. The potential here is endless, but one easy idea is to use it to selectively suppress ongoing magical effects in the environment. An example would be a room of the lair with reversed gravity, the beholder can use his central eye to quickly toss the players about and disorient them.
Lastly, remember that the legendary actions of the beholder allow it to snipe with eye-rays at the end of opponent's turns, so if they try and soldier through the hazards/traps you can try and crowd control them as punishment. Even if you only do it once, chances are the rest of the group will play it safer, which buys the beholder more time.