The situation of the Rohingya people, a Muslim minority group in Myanmar, is complex and sensitive and involves a number of political, economic, and social factors. India has not been accepting Rohingya refugees on a large scale, and the Indian government has stated that the Rohingya living in India are illegal immigrants and a security threat.
If the Rohingya were Hindu instead of Muslim, it is possible that the Indian government's stance would be different. India has a large Hindu majority population, and the Indian government is led by a Hindu nationalist party. Historically, the government and specific sectors of society have been less welcoming of Muslim minorities, and some people in India view them with suspicion. At the same time, they see Hindu refugees in a more favorable light.
It's worth noting, however, that the Indian government's stance on the Rohingya is not solely based on religious grounds, but also on security concerns. The Indian government has stated that the Rohingya living in India are illegal immigrants and a security threat, citing intelligence inputs that the Rohingya have been targeted for recruitment by extremist groups.

It is also important to remember that accepting refugees is not only a domestic issue but also a complex international issue, where the dynamics of refugee movements, the rights of refugees, and the capacity of host countries are at play. India is not a signatory to the 1951 UN refugee convention and does not have a national refugee law, which makes the management of refugees difficult.
It is not fair to say that India's stance on Rohingya would be the same if they were Hindus, and it would be more appropriate to say that India's stance on the Rohingya issue is complex and multifaceted, taking into account multiple factors such as security, domestic laws and policies, and international relations.