Unless the specification is also free of bugs and side effects, there is no guarantee that a rewrite would have fewer bugs.
Plenty of rewrites out there prove that point.
Seems relevant again:
https://www.joelonsoftware.com/2000/04/06/things-you-should-...
Seems relevant again:
https://www.joelonsoftware.com/2000/04/06/things-you-should-...