I Assume the cancel button may bet set to Cancel Changes, when an pop got displayed the cross mark action may be defined as Cancel Changes. (Make Sure should set to close page action). Its Will be on page properties section.
Try this out, if didn’t help expecting more details about issue.
as it is not possible to debug nanoflows, it is a great idea to use logs within the flow to check if certain steps are being triggered. The next step is to add some error handling on possible error-prone elements within the nanoflow to help show why the error is happening.