For code snippets, yes. If you ask the prompt to give you a match-3 game, that would be a bit different. But essentially, code you write is built on other code. You use Godot. The things you do with it, would not be as easy, without Godot existing. There are people doing certain things from scratch (in relative terms. They still use operating system calls and whatnot).
In coding there is also this concept of hierarchy of languages. How abstract is the code from the machine code. The continuation of that concept is using natural language. When the pseudo code is the code. The prompt you use would be the code. But since they use training data of the usual abstract languages, that approach is flawed at the moment. As you saw with your example.
In the arts, there are not that many abstraction layers and "library" calls. There are some. Especially when doing it digitally. And the artists also have issues with techniques like "tracing". Or "referencing". That is just a nice word to describe that one artist copies how a thing looks by looking or tracing the outlines from other art. What you would do in coding by looking at examples.
Anyway, that is my opinion why AI is not as frowned upon in coding as it is in "art".