I find it that the people who say "AI will replace developers" are the same ones that were thinking that CMSes will replace the need for developers, then no/low-code will replace the need for developers. But no, users are too stupid to handle stuff. Best case scenario developers will automate the easiest and time consuming things like UI creations and boilerplate using those tools. Most companies I know that use CMSes still have devs changing every single bit of the page because they either customized it so heavily or they simply implemented it wrong. I haven't seen a single successfully low-code company yet(though that just might be me). The same will happen with ChatGPT. It will become a tool, professionals still will be needed to use it properly.
Remember when "the cloud" was going to replace ops and on-prem and yet here was are 17 year since the release of AWS and we've only seen a 40% shift to the cloud and a massive need for ops people. Coders aren't going away they will just shift.