I'd say yes and no. Yes, because of the simple fact that if the Mughals survive as rulers of India into the 19th and 20th century, eventually
somebody will view them as illegitimate or problematic based on religion. Whether this belief is widespread is a different story. In modern times many people romanticize the Maratha Empire as being the Hindu version of the Mughals. However, we know that the Maratha Peshwas kept the Mughal Emperor as a figurehead simply because his legitimacy was so strong in North India, among Hindus and especially Muslims. Now whether this was done simply in the name of
realpolitik or because the Marathas actually preferred to keep the Timurid Emperors on the throne due to their illustrious ancestry is kind of irrelevant, because regardless religion was not enough of an important factor to overthrow the Mughals and place one of their own on the Peacock Throne. In some ATL maybe the Peshawar would have done so, but they would only be able to because of increased
political power, not by any religious mandate or what have you.
Now of course this is the 18th century, but even going into modern times, the religion issue most probably would not be enough to end Mughal rule over all of India. Let's say it's 1900, and the Gurkani Emperor still rules all of India. Now at this point one might expect large agitation for independence in the South and Deccan. Perhaps some agitation would occur, yet at this point the "Mughals" have ruled over all of India for just around two centuries. To do this, the Mughals would have to pacify the nobility of the South and the Deccan, like they did in the North. And after two centuries of this being the case most likely people in the South and Deccan would ultimately not give too much of a shit about the Mughals being Muslim, given that this India would be at least 1/3 muslim, probably more due to the survival of the Gurkani Sultanate. Their dynasty was regarded as extremely illustrious and being not originally Indian actually gave them a bit of an advantage in uniting the squabbling Indian Kings. Another thing is that even into the 20th century, more likely than not India will be very decentralized. It will still be a united area, but the only real way people will accept Mughal rule is if they are given a lot of autonomy. Having a Hindu Empress by tradition would also probably help in that regard, but of course that happened OTL with all the later Mughals.
There are also the number of economic benefits. That large of a united market without colonial restrictions would be great for Indian industry, and though most probably industrial Western goods will penetrate into the Indian market in the 19th century; India is just so damn big that the effects of this may not be too bad. Some deindustrialization will still occur simply because of the efficiency of Western industry, but not to the extent of it under British rule. This ATL India will still be very urbanized and have quite a bit of industry. The decline of Indian industry will most definitely have an affect on agitation against the status quo, but it may just be directed towards reform efforts initially as it was in China, Persia and Turkey. We must also remember that no British India will result in
huge changes in Asia. Most notably no Opium Wars unless the British can get opium cheap from elsewhere. Also no pounding on Persia (who may or may not be ruled by the Qajars, Zands, Afsharids, Safavids or other dynasty). Most likely the system of coastal European factories would continue, but with the British particularly influential if they still nab Ceylon. Very much dependent on the ATL at hand, but continued Mughal rule probably results in a generally more stable Asia.
Yes, this is one of the best case scenarios, but it is also very much within the realm of possibility. Perhaps the Mughals lose the very South but still keep most of the Deccan, but I think that people often underestimate the resilience of the old Asian Empires. I mean, the Qing survived until 1911 even after a century of the worst humiliations in all of Chinese history. The Ottomans really only fell because of WW1; they were around since
1299 for God's sake! And Iranian history in the past 250 years is honestly just depressing. Don't underestimate how much of the past 3 centuries is an Asia-screw. India is a very different beast entirely, but I do still think the "Mughals" very much can survive to modern times.
Edit: I should also add that the continued reign of the Mughals would very likely result in ever more religious syncretism. An India which is mostly peaceful and united will have the resources, political will, and social imperatives to undergo more religious change during this alt-18th century, especially in challenging the Turkish Caliphate. Think for example the increasing adoption of the writings and philosophy of Dara Shikoh which attempted to unite the Upanishads and Islamic philosophy (with limits of course). This alt-Indian Islam would however give the Mughals a very large boost in legitimacy in the eyes of the non-Muslim population and greatly decrease the chance of them being overthrown based on religion alone. That's just my take on the issue.
@Madhukar_Shah could likely give you a better answer.