They aren't deeply dependent on government contracts anymore. Starlink will be able to support them. Government good will, id say yes.
Starship is currently a money pit on the launch side, and will make or break that the company depending on if it works.
Its leasing excess capacity, but that might not always be the case, but IMO that business model is probably better than the selling an LLM model one, but if you run out of people willing to lease it, youre still left with a pile of hardware you gotta do something with.
If they stop leasing, xAI becomes a money pit too.