So what happens if you kill the target with a reaction while the target is casting a spell? Does it prevent the spell from being cast?
Core 462 wrote:
Disrupting ActionsVarious abilities and conditions, such as an Attack of
Opportunity, can disrupt an action. When an action
is disrupted, you still use the actions or reactions you
committed and you still expend any costs, but the action’s
effects don’t occur. In the case of an activity, you usually
lose all actions spent for the activity up through the end of
that turn. For instance, if you began a Cast a Spell activity
requiring 3 actions and the first action was disrupted, you
lose all 3 actions that you committed to that activity.
The GM decides what effects a disruption causes
beyond simply negating the effects that would have
occurred from the disrupted action.
Arguably no, if you kill a spellcaster when they provoke when casting, the spell does not go off.