Sadly, I don't think we are in a position to wait and see. If any player does not want to commit to us, we can't afford to lose him on the free. As hard as it is to say..... If we get a good offer, I would sell.
It's the other way around - we can't afford to not have Ndiaye's contributions on the pitch in 23/24, which will be worth more than whatever transfer fee we would reasonably get for him. It's basically what matt is saying below here. Even if we don't stay up, it's the correct play to retain and let him go on a free. Of course, the correct play (as I've said before) is to get him to extend to 2025 on massively improved terms (read - whatever you think our highest ever wage has been and more than double it) with a release clause after this season, which he'd be bonkers not to sign, but I wouldn't hold my breath on that
If he keeps us in the PL, that's worth more to United financially than any transfer fee we'll receive now.