No match for the Portuguese invaders, the court fled south, establishing a new center of Malay Muslim power in Johor.
They went south after being defeated and established a new town.
They chose to stay and did not flee south.