Similar to counterspelling counterspell, the spell temporal shunt (Explorer’s Guide to Wildemount, pg. 189) will also get the job done if the target fails its save:
You target the triggering creature, which must succeed on a Wisdom saving throw or vanish, being thrown to another point in time and causing the attack to miss or the spell to be wasted.
It has a casting time of 1 reaction “taken when a creature you can see makes an attack roll or starts to cast a spell”.
This spell also has some powerful tactical uses. The target disappears until the start of its next turn, and upcasting it allows you to target additional creatures.