Prior to this commit, TransactionalOperator::transactional did not close the transaction when cancelled. Closes gh-23864