Forcecage
An opaque cube of banded force surrounds the area, preventing any matter or spells from passing through it, though creatures can breathe inside it. Creatures that make a Dexterity saving throw and creatures that are only partially inside the area are pushed out of the area. Any other creature is trapped and can’t leave by nonmagical means. The cage also traps creatures on the Ethereal Plane, and can only be destroyed by dispel magic cast using a spell slot of at least 8th-level or by being dealt at least 25 force damage in one round by a single attack or from a single effect.
If a trapped creature tries to teleport or travel to another plane, it makes a Charisma saving throw . On a failure, the attempt fails and the spell or effect is wasted.
The spell’s area increases to a 20-foot cube when using a 9th-level spell slot.
Kreven’s Imprisoning Forcecage. The spell’s duration is 1 day. You can pass in and out of the cage freely, and you can dispel it at any time. If you cast this spell on the same area for 3 consecutive days, it is permanent until dispelled. Each time you cast the spell, any imprisoned creature can repeat its Dexterity saving throw to escape.