A federal judge in California on Tuesday dismissed a lawsuit from Elon Musk's AI startup xAI that accused rival OpenAI of stealing its trade secrets.