I doubt Hasbro ever sells WotC. Hasbro bought WotC for 325 million in 1999. That was 20 years ago and those brands have only increased in value, especially with the advent of 5e, online streaming, etc. I was reading some shareholder information and Magic alone probably brings in close to 500 million in revenue. D&D wouldn't be that high, but with 5e and licensing I could see combined D&D revenue between 50 and 100 million.
That means D&D and Magic IP would be worth easily north of 1 Billion today, and nobody aside from a major game studio or media conglomerate can afford that. Technically, on paper it would be worth more (if 500 mill in revenue is accurate than 3-5 billion is in the ballpark), but given the risk and volatility of the tabletop market, I'm not sure someone would pay what its really worth, thus making it less likely that Hasbro wants to sell without extracting full value for their properties. Selling those properties for less would be foolish unless Hasbro itself is being broken up for some reason and all their properties go in a fire sale.
There is also no value in WotC as a niche tabletop publisher without D&D and Magic attached to it, so this notion of WotC being sold with Hasbro retaining the licenses is unlikely. Who would buy WotC without D&D and Magic? Nobody. The only way that works is if Hasbro decides to outsource all their publishing and includes WotC assets as part of some sort of long term licensing deal with an established big time publisher to take the reins of D&D. I would only see Asmodee even coming close to the kind of numbers Hasbro would expect as part of such a deal. Maybe Hasbro would consider a sweet heart deal with Paizo, but they would have to bring in some big investors to help them and Pathfinder gets mothballed.
D&D could be sold by itself, but that too would be a 500 million dollar deal at the low end. Nobody in tabletop today can realistically afford that without bringing in some equity partners, and I don't see big equity taking a gamble on the niche tabletop industry like that. Too much risk and not enough upside, even with the D&D name. I could potentially see a game studio like EA making a deal like that, because they could instantly capitalize on that IP in video games.