Rafael, World of Valreign
4-level Abjuration
A semi-translucent force ray springs from your outstretched hand at a creature or object you can see within range. You must make a ranged spell attack to hit the target. This ray automatically hits objects that are not being worn or carried. On a hit, the target is unable to be affected by teleportation spells (such as dimension door and teleport), plane shifting, astral travel and ethereal travel.
A dimensional lock does not interfere with the movement of creatures already in ethereal or astral form when the spell is cast, nor does it block the ability to see into other planes of existence or affect them. Also, the dimensional anchor does not prevent summoned creatures from disappearing at the end of a summoning spell.
At higher levels: When you cast this spell using a 5th level spell slot, change the duration to 10 minutes. When you cast this spell using a 6th level spell slot, change the duration to 1 hour. When you cast this spell using a 7th level spell slot, change the duration to 8 hours without concentration. When you cast this spell using 8th level spell slot, change the duration to 24 hours without concentration. When you cast this spell using a 9th level spell slot, change the duration to until dispelled without concentration.