Take a human and have him study every single repo on GitHub
Take an AI and train it on every single repo on Github
Which of those two will continue to make novice mistakes like SQL injection and XSS vulnerabilities?
These AI "coding agents" aren't learning or thinking. They're just natural language statistical search engines, and as such it's easy to anthropomorphize them. Future generations will laugh at us, kinda like how we laugh at old products that contain cocaine, asbestos, lead, uranium, etc.
(citation needed)
"Machine learning" is neither mechanically nor conceptually similar to how humans learn, unless you take a uselessly broad view and define it as "thing goes in, thing comes out". The same could be applied to a simple CRUD app.