Rule number 1 and the only rule: You need to be a subject matter expert. Be it program logic or be it programming language. AI is only a helper, it will go wrong, frequently, and if you do not understand the reason for the code and the programming language, you will take so much more time than if you did not even use the AI.
Without naming the IDE, but one of the top 3 I guess, I asked it to simplify some code. I had repeated code 8 times. 6 of them were identical, the last 2 had a variation. The AI just did not catch it, and refactored all 8 blocks to use the logic of first block. How can you even do that? The code is similar but different, it looks the same but there are extra lines of code in the last 2 blocks !!
And it took me a while to realize this. I never ingest AI code directly so at first I was marveling at a job well done, and as I read and compared, the horror !! And that was not the first time it happened, but once again I got tricked by the soft spoken well mannered AI to believe that it did a fantastic job when it did not.
Edit: It is just an assistant. You give it a task, it will make a mistake, you tell it to fix the mistake, it will fix the mistake. It still saves you time. Next day, it will make the same mistake - and hopefully that gets reduced as the versions evolve.