Many fields are grappling with the question, "will AI take my job?"
I think a more reasonable response is one I've seen in, for example, the medical profession:
"Langlotz concluded that “Will A.I. replace radiologists?” is “the wrong question.” Instead, he wrote, “The right answer is: Radiologists who use A.I. will replace radiologists who don’t.”"
https://www.nytimes.com/2022/1...
The same is probably true for software engineers. We can't just hand over the whole task to a machine, but we can definitely get some productivity boosts by having code assistants handy to generate starting point code and same a lot of time.
The best things in life go on sale sooner or later.