That or Guybrush and Elaine's wedding ship unknowingly slipped through a fissure in time, eventually leading to the events of Legend. Sometime after the ending of Legend, Guybrush and Elaine got back on their ship and unknowingly slipped back through the fissure, wiping their memories of the events of Legend, accidentally colliding with a ship of random pirates who board their vessel, tie Guybrush to his own mast, battle Elaine, and set the events of Escape in motion.
Tada! Canon! π