I have used it to generate C software that accesses an SQL database. I fed it pseudo code for what I wanted it to do. It provided complete schemas with relationships included as well as C code to use the mySQL database. With only minor tweeking the program worked perfectly.
I propose that you do not how to use it or you took it out of its knowledge base.
I am greatly envious of your claimed results. I have not had such successes with AI code generation. Nor have any of my colleagues.
I have been able to get skeleton applications created in an unfamiliar technology, but they required a lot of changes to even compile, let alone run. They were definitely not suitable as a production-grade application.
I have had better luck using AI to generate classes or methods particularly when I needed to lookup details of a specialized algorithm. AI finds example codes very quickly and much of those codes can be easily adapted to my project needs.
I cannot just cut-and-paste AI code. It takes high-level understanding of the topics to use it, and modifications are always required. Studying the raw code responses is a good training outline. It often tells me what I didn't know that I didn't know.
As the label on the box says; "Some assembly required".