If D&D was going down in flames, they'd cut bait and sell. Holding on to it would result in further losses.
The value of D&D as a game is dwarfed by the value of D&D as an IP. If D&D was going down the tubes, it is unlikely that Hasbro would sell it off. Rather, they would simply shelve it and wait for it to become valuable again.