Why do you think what a large language model is telling you is something that is being executed?
This does not imply that any large language model executes the code it writes... I get it, they don't. I build models myself and have a fairly good understanding of how they work. But ChatGPT-4 does provide the ability to generate and run code in its own sandbox environment, outside of the model itself.