All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
This Hadeeth – as you mentioned – is reported by Al-Bukhari and Muslim, but we have not come across any evidence that this woman was affected by leprosy, but she was suffering from epilepsy (possession by jinn) as per the wording of the Hadeeth. Ibn Hajar mentioned when interpreting this Hadeeth in Saheeh Al-Bukhari, that the meaning should be taken from all routes (chains of narrations) of the Hadeeth that this woman is possessed by jinn.
As regards your statement “It is known that if jinn is in the body of any human being, then it is very big sin and that this is like Zina (committing fornication or adultery)”, then where is its source in the Book of Allaah and the Sunnah of the Prophet ? Moreover, we do not know any scholar who has ever said such a statement. Besides, if a person is possessed by jinn, the person has nothing to do with it so that we would consider him sinful.
Therefore, your statement “How can Prophet Muhammad allow the jinn to stay (as it is Zina) in the body of that woman” is based in principle on a wrong introduction. In addition to this, it is not appropriate to ask such a question about the Prophet so, you should be careful.
Allaah Knows best.