A causa mortis declaration registers the transfer of property on death - i.e. inheritance - rather than a sale. A surviving spouse inheriting their deceased spouse’s share of their sole residence is exempt from stamp duty, and children are similarly exempt inheriting a parent’s residence, provided the causa mortis declaration is made within 1 year of death.
See Stamp Duty & Buying Costs for this and other stamp duty exemptions.