It's a question of how much.
If AI told you have a missing semicolon and it regenerated an almost exact copy of your code, with only the added semicolon being different, then the case is very strong that the fixed code is a derived work of only your code. (Moreover, side point: you could burn that session, keeping the fix, and nobody would ever suspect.)
If it's purely generated, then there is no question it's a derived work of unknown works used without permission.
Those are the extreme endpoints. I think that the bulk of the intermediate area between steers toward infringment; the contribution from AI has to be very low or trivial to have a clear case that the work is still clean.
This is because a small amount of illegal material taints the whole work; it's not a linear interpolation whereby if you wrote 90% of it, it's 90% in the clear. E.g. one GPL-ed source file in a work with 50,000 source files requires the whole thing to be GPLed, or else that file removed.