Elon Musk's aggressive cost-cutting measures in the US government will put "millions" at risk, Microsoft co-founder Bill Gates has warned.