I've never had AI one-shot even a 10 line script that I didn't manually revise. To be fair, it usually produces something that works, but after seeing it I'll realize that my prompt was too vague or I left out some edge case. So it's the old problem with software "it does what was asked for but not what was needed."
So I speculate that a lot of problems with AI code are just that it is accepted uncritically because it builds and doesn't have any syntax errors.