Tesla's AI Bet Weighs on Profit Despite Record Revenue