One who converts to Islam does not get responsible for his/her previous actions. In fact, all of his/her bad deeds get converted to good. Because Allah the Almighty says:
“Except for those who repent, trust (in Allah) and do righteous work… Allah will replace their evil deeds with good. Because Allah always forgives, and grants.” (The Criterion 25:70)
This is one of the many examples of the Almighty’s generosity.
Now, one can think of it as “unjust” for Muslims. Let us say it’s not. Because Allah commands:
“Whoever comes with a good deed will be treated like he has done it ten times. Whoever comes with an evil deed will be treated with its alike. None will be wronged.” (The Cattle 6:160)
If one converts to Islam at the age of 40, he will get rewarded with 40 years of goodness, while a 40 year old real Muslim should be like he/she is doing goodness for at least 400 years.