Imran Khan has been facing contempt of court charges in past also

Imran Khan directs immediate restoration of students unions in Punjab
Currently, the embattled former Prime Minister of Pakistan, Imran Khan, has somehow escaped several contempt of court cases filed against him over the past nine years since 2013.
Though it to be seen what will happen on August 31 when he will appear before the Islamabad High court, to defend his derogatory remarks about Additional session Judge Islamabad Zeba Chaudhry, who granted the physical remand of jailed Pakistan Tehreek-e-Insaf (PTI) leader Shahbaz Gill in a sedition case.
In past, on 28 August 2013, the Supreme Court dismissed the contempt of court charges against Imran, accepting the explanation that he had not actually intended to defame senior judges.
On July 18, 2014, President Islamabad Bar Association Naseer Kiyani and General Secretary Naeem Gujjar once again accused Imran of the Supreme Court and former Chief Justice Iftikhar Chaudhry for abusing, defaming, ridiculing and creating disrespect and hatred. He was dragged to the court.
In November 2021, the Supreme Court summoned Imran Khan (the then Prime Minister) in the Peshawar Army Public School (APS) suo motu case.