We might start with a user story, translate that to pseudo-code, and translate that to python. We might iterate a few times, showing the junior the incorrect assumptions they made, or the edge cases they missed. But eventually, you get to the correct answer.
You might not even _know_ the correct answer when you start out. This can be an exercise in showing the junior how your brain works when it tackles a problem.
Coding with ChatGPT is very similar.
And honestly, the "code" part of software engineering is the least difficult part. Understanding the problem, expressing it cogently, accounting for edge cases, and so on are the real meat of the job. Once you understand the solution, translating the solution into Javascript or Go or whatever is, if not trivial, usually straightforward.
Coding with ChatGPT is an exercise is carefully stating a problem, so that it can be turned into executable code. It's still software engineering, but the final step, the translation from answer into an executable, is more automated.