That’s a good idea, tabsicle! If Cora found out that Rumple was getting Regina to cast the curse, she could have altered it so that no one could leave. That way, all she would have to do is find a portal to Storybrooke and not have to search the whole world. It would make sense if Cora did this because Rumple obviously didn’t know that he wouldn’t be able to leave.
Although, I have another idea about why they can’t leave. I think that because Rumple brought magic back, the price of that magic was the barrier.