Trump and Musk may not pay attention to the constitution, but I understand that the US armed forces swear allegiance to the constitution — while they must obey lawful orders of the president, unconstituional orders must be refused even if from the president.
https://www.nbcnews.com/politics/congress/gonzales-elon-musk...