AI is not going to automate away engineering tasks anytime soon. Sure, some mundane things will be done faster, but essentially it will be the work that is easiest to pick off and the work that most engineers hate doing anyway. So I say bring that on.
Now if you want out of engineering (which is totally reasonable), find a passion and figure out a way to get involved/make money at it, but don't use AI as an excuse why it makes sense. There is no company offering services to transition engineers out of roles because there is no demand. And usually when there is demand for that type of stuff, it happens at the local levels, through either small companies or the local colleges/universities.
Even if you are just starting out, you can have a complete career and retire before Software engineering will disappear in any meaningful way. I've been doing this for over 20 years, and frankly engineers (and some other professionals) are a paranoid group as a whole. I have seen many "ends" of software engineering come and go and yet it keeps growing and demand has gone up and salaries have finally started an upward trend again over the past few years.
Of course, this is just my opinion, I am sure you can find a pessimist in the crowd who will say the sky is falling and get out now while you can.
If AI can debug your code today, fine, that’s awesome, you could focus on solving better problems... But how about in 10 years from now? Will it debug its own code? I think it’s an interesting question to ask - what will happen to software development in 15 years from now? From 1990 to 2000 we got the Internet, it has disrupted the way we work. From 2000 until today, nothing revolutionary came to life. Electric cars? Crypto? Unfortunately the last 20 years have been very flat and secured minus a few recessions or automations within various industries. I wouldn't relate too much on that. Tomorrow could still bring something completely different than yesterday. Again, this is my "critical" way of thinking. It might sound a little dark sometimes I agree ;)
Transitioning to a business role is all about connections. There is very little skill involved (MBA, years of experience, etc etc are not particularly meaningful except for middle management roles at major corporations, which still hire mostly on nepotism)
And why would one move away from software eng? It's going to be decades before it is automated away. We still have cashiers and waiters despite both professions being nearly ready for complete roboticization and automation.
Trust me, stay where the money is. The grass isn't greener, unless someone is offering you tons of money to be in the c-suite of a massive business for some reason.