No, it's not random. There was a patch released Sep 29 2020 "Once a party leader leaves a group, leadership is passed onto the first invited member." (Source: News)
The TibiaWiki br says that when the leader leaves the party, the first member invited becomes the new leader. But after many tests I couldn't find an order.
Golden Contribution - Winter Update 2024 contestNovember 24, 2024
Brighid Grand Explorateur - Applying to TibiaQA team as ModeratorNovember 19, 2024
Looking for new TibiaQA staff membersJuly 12, 2024