In theory yes, you're supposed to migrate away from the legacy codebase.
In practice I've never, ever, ever seen that happen: it's too much upfront cost to start over, especially when you have real customers and real data on top of it and you need to keep pumping out new features.
In practice I've never, ever, ever seen that happen: it's too much upfront cost to start over, especially when you have real customers and real data on top of it and you need to keep pumping out new features.