Muhammad bin Qasim himself was put to death by the Caliph, by suffocation in oxen hides. The reason was that the Caliph wanted to be the first to rape the daughters of Raja Dahir, but bin Qasim had actually raped them before the Caliph. This disobedience of bin Qasim filled the Caliph with rage.
Muhammad bin Qasim's successors were smashed by the Rajputs in the battle of Rajasthan. (Battle of Rajasthan - Wikipedia, the free encyclopedia
). In the words of the Arab chronicler Suleiman, “a place of refuge to which the Muslims might flee was not to be found.”
Finally, it was the invasions of the Turks from the North 300 years later, which succeeded in converting the ancestors of the Pakistanis.