You're confusing Tesla for like 10 other Chinese brands. Tesla too is falling behind, particularly when it comes to price.
BYD may very well be pulling ahead on battery tech and vertical integration right now.
In a few years Tesla's primary moat will be political
'BYD has pulled ahead on battery tech and vertical integration right now.' - FTFY