This is the same issue brought up here, and this is the explanation for why this is happening. Marking the closure passed to setCancelHandler as @Sendable will fix this issue.
setCancelHandler
@Sendable