A British regulator said it had started a formal investigation into Mr. Musk’s chatbot over the spread of illegal images.