Maybe Jafar’s bottle got transported to the Land of Untold Stories after WL. But the problem is if the Jafar/Aladdin story is after WL, how did Jafar get out of the Land of Untold Stories?
Seems like an easy answer. Hyde brought him, when he brought over the rest of the Land of Untold Stories’ residents to Storybrooke. If you’re referring to the Jafar/Aladdin flashback, that was established to take place “many years ago”. So probably after Jafar turned Amara into the snake staff, but before he went to Wonderland. There is plenty of room for gaps in his story. We don’t know how soon he tracked down Cyrus’ owner in Agrabah, nor do we know how soon he found out Cyrus was sent to Wonderland. Not to mention, we don’t even know if Jafar traveled back and forth between the two worlds.