During the 7th century, some lands of what is today, India were part of the Persian Empire. The Islamic conquest to Persia started with the Caliph Abu Bakr, who had only ruled for 2 years but was completed during the time of the Caliph Omar. Omar himself was so surprised of the rapid fall of the Persian Empire even though the Persians were able to mobilized vast armies that outnumbered their Muslim foes. So, Omar had commanded the Muslim generals to stop the conquest & focus on consolidating the lands they conquered.
50 years later with the rise of the Umayyad dynasty, the Caliphs were not as competent as Omar so were the generals of their armies. & of course, the Indians did better strategic moves in their struggle against the Muslim armies.