I'd say you only pay 10% of the cost when you finish/launch the re-written software. The other 90% of cost comes later in the format of operations, deprecation and migration, people both users and devs, community friction and learning cost.
And that 90% could be an underestimate here.