In general, loss carryovers and other tax attributes are traced back to the individual whose activity or business interest created the loss, and those losses of a decedent are not passed on to the surviving spouse or the estate. In the year of death, a married couple filing a joint tax return, both parties can use the losses, even income attributable to the surviving spouse after the decedent's death because of filing jointly.
Maybe this article will help: https://www.thetaxadviser.com/issues/2017/jan/carryovers-death-spouse.html