Back when I was still in the film/video industry, it happened often, you kinda get accustomed to the ephemeral nature and you try not to get too attached to your work. Not always successfully but you try.
This can also be a destructive siren call:
https://www.joelonsoftware.com/2000/04/06/things-you-should-...
But I think it's not absolute. Sometimes rewrites are imperative.
I don't think an analogy to software rewrite works very well, the domains are so different. For example Joel makes the point that code have a lot of embedded information which you have to rediscover if you rewrite from scratch. This introduces a huge risk and uncertainty.
If you rewrite a movie script halfway during production you have to scrap a lot of work but you don't really loose knowledge, so the risk is more manageable.
"We have to keep this scene even though it's not quite perfect because otherwise it's a waste of money".
Maybe this is a bad example actually, movie industry is something you launch and market and leave.
But the best architectures I've seen have been demolished, destroyed and rebuilt from the ground up for their purpose.
Same with code.