Prototype code may survive, but that is not the success condition. A useful prototype produces evidence, exposes missing data and integrations, and creates a defensible go, change, or stop decision.
The most expensive prototypes are the successful ones. They work, everyone is pleased, and then they quietly become the production system because nobody wanted to pay for the same thing twice.
A prototype has one job: answer the question that would be most costly to get wrong later. Can we get the data at all. Does the model clear the bar on the hard cases, not the demo cases. Will anyone actually change how they work.
That job takes days or weeks. If a prototype has been running for four months it is not a prototype any more. It is an unsupported production system with no tests and one person who understands it.
Write the question down before you start, along with the answer that would stop the project. A prototype that cannot fail is not an experiment. It is a demo with a budget.