I believe the BYD factory was built before the trade war. Any new investment into the US, especially high profile sectors like cars is going to need very serious risk analysis
In the same Trump started trade war, they also tried to ban TikTok and WeChat. In both cases, they took it to the courts and got the orders revoked.
The same order was placed on Xiaomi and that got challenged and revoked by the court system too. The fact that BYD has already operated in US for this long and supplied so many contracts in America makes it nearly impossible for any further US administration to designate it as a security risk.