The Prophet ﷺ said, "Whoever sees something in his ruler that he dislikes, let him be patient with it, for whoever departs from the community by even a handspan and then dies, dies the death of pre-Islamic ignorance."
عن النبي ﷺ قال: من رأى من أميره شيئا يكرهه فليصبر عليه، فإنه من فارق الجماعة شبرا فمات إلا مات ميتة جاهلية.
Bukhari narrated it in the Book of Tribulations (7054), and Muslim in the Book of Governance (1849: 55), both through the route of Hammad bin Zayd, from Jaad Abu Uthman, who said, Abu Raja Attaradi narrated to me, saying, I heard Ibn Abbas, and he mentioned it.