For the sake of argument, let’s say it could replace the coding part cost effectively. Can it still do all the other parts? Take ambiguous requirements and seek clarity from design, product, etc. (instructing an AI to a sufficient degree to build a complex feature could almost be a coding task itself). Code reviews. Deal with random build failures. Properly document the functionality so that other programmers and stakeholders can understand. Debug and fix production issues. And that’s just a subset.
Realistically, in the future there will be a long phase of programmers leveraging AI to be more efficient before there’s any chance that AI can effectively replace a decent programmer.
This will be an advantage to engineers who think on the more abstract side of the spectrum. The “lower level” programming tasks will be consumed first.