You can't have service members publicly criticizing this or any Commander-in-Chief. It undermines authority and discipline.
I believe enlisted and officers are treated differently in this regard. Officers can be subject to UCMJ for "speaking out" but I don't think enlisted can. Of course, exceptions exist for everything but generally speaking enlisted don't have much to worry about.
There are some distinctions in DoD policy made between officer and enlisted, but they are - as a practical matter - fairly insignificant distinctions. The relevant DoD Directive DoD is 1344.10. Essentially, neither enlisted nor officer is allowed to use "contemptuous words" about with respect to political speech, but officers are explicitly forbidden from using such words.
Of course, the UCMJ (which applies fully to ally US service members) also prohibits "contempt towards an official" in Article 88. Official is defined fairly broadly when using the language, "..President, the Vice President, Congress, the Secretary of Defense, the Secretary of a military department, the Secretary of Transportation, or the Governor or legislature of any State, Territory, Commonwealth, or possession in which he is on duty or present shall be punished as a court-martial may direct....