The army isn't completely united, and the current COAS of Pakistan (Asim Munir) is much more ideological than the former one (Qamar Javed Bajwa), who he pushed out after Bajwa and Imran Khan demoted Munir from the ISI to a (relatively) lowly Corp Commander.
Bajwa was working on normalizing relations with India, but himself got undermined by Imran Khan and separately by Asim Munir.