Some religion says that rebirth happens, some says it does not happens. In this regard, Sanatan Dharma clearly states that if a person performs very virtuous act, then he will not be born again, that is, he will get Moksha or else he will be born again and a human being can be born in any Yoni.
These virtues are almost the same which is mentioned in other religions also, except for the worship system, ie, idol worship (Saguna Saakra Brahm) or formless (Nirguna Nirakaar Brahma). Whichever is the worship system, the virtuous deeds are almost same.
Therefore, just as the children of a Doctor cannot become Doctor after being born in a doctor’s house, he will also have to work hard, study and treat patients with good behavior, in the same way, people cannot get any benefit of religion not just being by being born in that religion. Moksha is achieved only by doing all the good deeds described in any religion.