Ibn ʿAbd al-Barr (d. 463) is from the Mālikī scholars and he said in al-Iistidhkār (5/16):
وَأَمَّا جَمَاعَةُ أَهْلِ السُّنَّةِ وَأَئِمَّتُهُمْ فَقَالُوا هَذَا هُوَ الِاخْتِيَارُ أَنْ يَكُونَ الْإِمَامُ فَاضِلًا عَالِمًا عَدْلًا مُحْسِنًا قَوِيًّا عَلَى الْقِيَامِ كَمَا يَلْزَمُهُ فِي الْإِمَامَةِ فَإِنْ لَمْ يَكُنْ فَالصَّبْرُ عَلَى طَاعَةِ الْإِمَامِ الْجَائِرِ أَولَى مِنَ الْخُرُوجِ عَلَيْهِ لِأَنَّ فِي مُنَازَعَتِهِ وَالْخُرُوجِ عَلَيْهِ اسْتِبْدَالَ الْأَمْنِ بِالْخَوْفِ وَإِرَاقَةَ الدِّمَاءِ وَانْطِلَاقَ أَيْدِي الدَّهْمَاءِ وَتَبْيِيتَ الْغَارَاتِ عَلَى الْمُسْلِمِينَ وَالْفَسَادَ فِي الْأَرْضِ وَهَذَا أَعْظَمُ مِنَ الصَّبْرِ عَلَى جَوْرِ الجائر
As for the jamāʿah of Ahl al-Sunnah, and their leading imāms, they said: This is the chosen (viewpoint) that the ruler (imām) should be virtuous, knowledgeable, just, righteous (muḥsin), strong in establishment (of his duty), as is required of him in leadership. And if he is not as such, then patience in obeying the tyrannical ruler is better than rebelling against him. This is because in contending for rule with him and rebelling against him leads to replacing security with fear and shedding of blood and and letting loose the hands of the common people, and the hatching of incursions (attacks) upon Muslims, and corruption on the earth. And this is greater (in evil) than patience upon tyranny of the tyrant.
Abū ʿIyaaḍ
1 Ramadan 1440 / 6 May 2019