All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
Once received, the Zakah funds become the property of the eligible recipient and he/she can dispose of them, lawfully, the way he/she likes. The evidence on this is that Allah the Almighty says (What means): "Alms are for the poor and the needy, and those employed to administer the (funds); for those whose hearts have been (recently) reconciled (to Truth); for those in bondage and in debt; in the cause of God; and for the wayfarer: (thus is it) ordained by God, and God is full of knowledge and wisdom." {At-Tawbah, 60}. After the owner of the wealth passes away, his/her estate is governed by the rules of inheritance prescribed in Islamic Law (Sharia).
Moreover, washing, shrouding, and burial expenses must be paid for from the estate of the deceased. This is in addition to repayment of his/her debts. However, it isn`t permissible to cover any other expenses using the deceased's estate save with the permission of the heirs. In case one of the heirs is a minor, it isn`t permissible to take any portion of his share since his/her consent in this regard is inconsiderable. Since Allah`s rights outweigh people`s rights, giving Zakah outweighs repaying debt. Al-Shirbini says: "According to the more correct opinion of the Shafie school of thought, Allah`s debt, such as Zakah, Kafarah (Expiation), and Hajj (Pilgrimage to Makkah), must be given precedence over man`s debt." {Moghni al-Mohtajj, Vol.4:P.7}.
In conclusion, the wealth left by the deceased must be spent on burial preparations and repayment of debt before the division of the estate and what remains after that is governed by the rules of inheritance prescribed in Islamic Law. And Allah the Almighty knows best.