Learning to code (I don't require it to be machine code) involves mastering a level of abstract thinking that is sufficient to make the computer do what you want. It's more than pushing A to make Mario jump, it's more than learning how to put a SUM() on an excel column, and it's more than typing "make a program that does this" into ChatGPT. I don't know exactly where the line is, but it's going to involve some level of the kind of suffering and brain lock that higher level thought involves.
I'm not a purist on a mountaintop saying tools can't be used effectively during coding. Everyone googles for API parameters, you can just ask ChatGPT how to fix syntax in an unfamiliar language, and you can copy anything you have access to and paste it in, that's all okay. It just isn't what makes you a coder any more than wearing a uniform makes you a cop.