I think Mathematica will survive because the alternative is for AIs to write the code to do a computation or use an open-source library. And there are many calculations for which there simply isn't an open-source tool for evaluating.
But I wouldn't be surprised to see Mathematica being used primarily as an AI plugin in the coming years. Mathematica now has an MCP which I use regularly from Claude Code. It's nice not having to write the lengthy Mathematica expressions by hand.