Solar panels are a commodity and they are getting cheaper. That will continue regardless of which political party is in charge.
Moving the solar supply chain to be domestic is a massive undertaking. First Solar, one of the stronger US companies, will be at at 50/50 manufacturing in the US versus not:
"We inaugurated our new $1.1 billion Alabama facility, which when, fully scaled, adds 3.5 gigawatts of vertically integrated nameplate solar manufacturing capacity. The start of commercial operation at the Alabama facility, along with our under construction Louisiana facility, which remains on track to begin operations in the second half of 2025, keeps us on course to achieve our projection of over 14 gigawatts of annual U.S. nameplate capacity and over 25 gigawatts of global nameplate capacity by 2026." https://www.fool.com/earnings/call-transcripts/2024/10/29/fi...
You are correct that it will take investment to continue to build factories here instead of Malaysia or India, but the factories will be built regardless.