Of course but the cost can be mitigated. I've seen an AI built project and the outcome is that you pretty much have to continue using AI to continue development because it's borderline incomprehensible for humans. When AI fails to continue development you scrap the entire project and start from scratch.
I imagine all companies that allowed AI to go wild in their codebase have a lot of components that need to be rebuilt from the ground up.