Over my 40 year career (thankfully retired now), I participated in 3 total rewrites.
The first two never produced anything and sucked up huge amounts of development resources.
The reason was identical both times:
New management wanted to take over a successful product and make a name for themselves.
They never really understood the original product and nor did the (largely) new development staff thay used.
The third rewrite project was a success.
The original management used most of the original development team to rebuild, from the ground up, the product.
While the rewrite took slightly longer than the estimates, the results were better than predicted.
The company was subsequently sold to a huge bank for hundreds of millions of dollars.
The team that built the original product and also did the rewrite still consider themselves a team, despite the fact
that most of us no longer work together.
IT'S ALL ABOUT THE TEAM
Full credit goes to the management for team building, which is the most important aspect of managing just about anything.