This is politically motivated and unconstitutional. The Shehbaz Sharif-led government has become frustrated as Imran Khan's party remains immensely popular and holds significant sway in Parliament. By upping the ante against PTI and Pakistan's most popular leader, the government wants to further Pakistan into political instability and uncertainty. However, all of his opponents' anti-democracy moves will not prevent Khan from returning to power as the judiciary is asserting itself now.
Khan's actions have been treasonous, having sabotaged Pakistan's deal with the International Monetary Fund, received funds from Indian Americans, and manipulated the US to pass a resolution calling for a probe into Pakistan's February vote. If Pakistan is to move forward, it can't do so with the PTI, which, it should also be noted, previously banned its own political opponents. The PTI is getting what it deserves morally and legally.