Often the code proposed by AI contain errors that come from NON EXISTING instructions or other things.
In my opinion is a mistake to work with code produced in this way.
Slowly (or not so slowly) we will start to stop thinking and learning.
This is not the way to approach coding.
You should know and understand as well as possible what is happening in your code.
When AI will be smart enough, developers will be useless.
Anyway this is only my opinion.
Coding it's not my living work, so I say all of this out of any interest.
And I could be right or wrong just because of this.