Answering here from the perspective of 5.0, but I don't know if this has been changed in 5.5.
I think that going by the RAW you DM is correct: the Beholder creates a cone with the same effect as an Antimagic Field spell, which says that spells cannot be cast from inside the affected area. Ready a spell says you cast the spell as normal when taking the Ready action except you "hold its energy" and release it with your reaction after the trigger. In this case, the casting occurs before the trigger so you're still in the antimagic area and cannot cast.
From the
2014 SRD:
[...] When you ready a spell, you cast it as normal but hold its energy, which you release with your reaction when the trigger occurs. To be readied, a spell must have a casting time of 1 action, and holding onto the spell's magic requires concentration. If your concentration is broken, the spell dissipates without taking effect. For example, if you are concentrating on the
web spell and ready
magic missile, your
web spell ends, and if you take damage before you release
magic missile with your reaction, your concentration might be broken. [...]
So you do cast the spell, losing the spell slot, and then hold it using your concentration, meaning you lose concentration if you are holding in it on anything else already (you can only concentrate on one thing), and if your concentration is broken while holding the spell, it can no longer be triggered. In any case, the spell slot is gone.
This means in your second example, I think the ruling is absolutely correct.
Now to the Beholder, see
Antimagic Field:
[...] A slot expended to cast a suppressed spell is consumed. While an effect is suppressed, it doesn't function, but the time it spends suppressed counts against its duration. [...]
[...]
Spells. Any active spell or other magical effect on a creature or an object in the sphere is suppressed while the creature or object is in it. [...]
I think it is clear that you lose a spell slot if you try to cast while inside the antimagic field (or gaze in that case). I think you could rule that you could cast the spell before entering the filed/gaze, hold it while you are inside, and it get's triggered after you leave the filed, if the trigger applies. That's how I would do it, in any case, seeing as the filed/gaze does not dispel magic, but suppresses it.
Hope that helps!