It is better to apply perfume to the body of the deceased and to the shroud
It is narrated from Jabir (may Allah be pleased with him) that the Messenger of Allah ﷺ said:
إذا أجمرتم الميت فأجمروه ثلاثا
“When you perfume the deceased with incense (that is, apply perfume), then do so three times.”
This command does not apply to a person in the state of ihram, because regarding the man in ihram who fell from his mount and met his death, the Messenger of Allah ﷺ said ولا تطيبوه “Do not apply perfume to him.” In one narration the words are ولا تحنطوه “Do not apply hanut (perfume for the dead) to him.” And in another narration it is ولا تمسوه طيبا “And do not touch him with perfume.”
In this narration, the reason given for the prohibition of perfume is:
فان الله يبعثه يوم القيمة ملبيا
“Indeed, Allah the Exalted will raise him on the Day of Resurrection while he is saying the talbiyah.”
Since he will be raised in the state of ihram, and applying perfume is forbidden in the state of ihram, applying perfume to his dead body was also prohibited.