<p>No, it's not random. There was a patch released Sep 29 2020 "<strong>Once a party leader leaves a group, leadership is passed onto the first invited member.</strong>" (Source: <a rel="nofollow" href="https://www.tibia.com/news/?subtopic=newsarchive&id=5756&fbegind=30&fbeginm=8&fbeginy=2020&fendd=29&fendm=9&fendy=2020&flist=11111111">News)</a></p>