If AI will be able to do your SWE job I can't really see why it wouldn't be able to do basic to mid-level AI work. So in that case lots of data scientists will lose their job as well...with perhaps a tiny tiny minority of freak geniuses still developing and experimenting with better AI techniques.
I see where you're coming form but don't make huge changes based just on fear. You'll keep being afraid even if you move to AI...it's in our DNA to be worried all the time.