President Donald Trump has come out against a Republican-backed government funding bill, aligning himself with Elon Musk.