Earlier quoted context omitted.
And you will have no idea whether the solution it presents to you is idiomatic or recommended or contains some common critical flaw or is hopelessly outdated. How can you find out? Back to alt-tabbing to the browser. Sure it may take a bit more time to get going, but then you'll get it right the first time and learn something along the way. Your copilot example is just another iteration of copy-and-paste some random…
You have no idea if the alternative code you would have written would have been idiomatic or had some critical flaw. We have 50+ years of software engineering wisdom to deal with these issues. Testing, Fuzzing, version control, code reviews, the whole gauntlet.
I can't know that my code will be free of critical flaws, but I do understand the common sources of flaws and techniques to avoid them, and I'm quite confident I can build small features like this that simply aren't vulnerable to SQL injection, on the first try and without requiring fuzzers or code review: https://infosec.exchange/@malwaretech/110029899620668108