Despite improved gross margin, Leapmotor's losses continued to widen in the second quarter as it saw record quarterly R&D investments.