Inspired by this question.
The Demiplane of Ravenloft has the "quirk" of preventing any magic that would allow one to "escape" it:
No spell — not even wish — allows one to escape from Strahd’s domain. Astral projection, teleport, plane shift, and similar spells cast for the purpose of leaving Barovia simply fail, as do effects that banish a creature to another plane of existence. These restrictions apply to magic items and artifacts that have properties that transport or banish creatures to other planes.
So, no spell, Item, artifact, or even Deity Magic can banish a creature from Ravenloft or allow it to escape from within Ravenloft.
However, what isn't clear is whether a creature can be plucked from Ravenloft with a Summoning Spell cast from Outside of Ravenloft.
Let's say that Marcus, a Human Assassin, was transported to Ravenloft somehow. However, Marcus's employers, who are not happy with him, wish to interrogate him about a task he failed, and they use the Gate Spell.
When you cast this spell, you can speak the name of a specific creature (a pseudonym, title, or nickname doesn't work). If that creature is on a plane other than the one you are on, the portal opens in the named creature's immediate vicinity and draws the creature through it to the nearest unoccupied space on your side of the portal. You gain no Special power over the creature, and it is free to act as the DM deems appropriate. It might leave, Attack you, or help you.
It is important to note that:
Deities and other planar rulers can prevent portals created by this spell from opening in their presence or anywhere within their domains.
However, it seems that this rule acts more on a case-by-case, since specific portals can be prevented from opening, or they can be allowed to open. It also does not say that they are prevented by any general realm "rules", only by arbitration by a Deity or "Planar Ruler."
Would it be possible to "Escape" Ravenloft by being summoned from someone outside it?
And would it make any difference if Marcus were a PC or NPC?