If the Friday sermon contains slander against the scholars of the Sunnah or the rulers, you may distract yourself from listening and complete the prayer, then avoid returning. If you can reach another masjid of the people of Sunnah in time, you should attend there instead.
If I am at the masjid on Friday while the sermoniser is badmouthing the scholars of the Sunnah and the rulers, am I permitted to leave the masjid?
You are permitted to distract yourself from what is being said, complete the prayer afterwards and then never return. What I am saying is that you entered already and I am afraid that if I were to tell you to go to another masjid you would miss the Friday prayer… In that case let me explain further: if it is possible for you leave this masjid and make in time to another masjid – a masjid of the people of Sunnah – and attend the Friday prayer there, do so. Otherwise, distract yourself from listening to what he is saying until he is finished and you pray and never return to this masjid.