Refs #18098 - Fix deletion when cancel button is clicked