Math isn't useless. One of its defining features is its "unreasonable effectiveness" in formulating scientific ideas. It's hard to say exactly why it's so useful, but it is, even if mathematicians aren't trying to make it useful.
It's not at all clear whether the kind of math created by LLMs will retain the usefulness of the old math. LLMs are good at rigor but bad at intuition. It's not even really clear if the rigor was ever all that important. Theoretical physics is full of people using math in ways that don't meet the bar of rigor that mathematicians set for themselves, but they have enough physical intuition for what they're doing, so it doesn't matter. It's an open question whether post-LLM math will continue to supply scientists with the kinds of ideas that they need from it.