That's a political problem, and requires a political solution.
The political solution is to not partner with the Pentagon
There are a lot of companies that probably don’t have “official” partnerships with the govt but absolutely help them, like every social media company, OS maker, telecom, auto maker, and ISP.