“Being politically active while in uniform is counter to federal law”
Then you need to read the actual law: DoD Directive 1344.10.
4.1.1. A member of the Armed Forces on active duty may:
4.1.1.1. Register, vote, and express a personal opinion on political candidates and issues, but not as a representative of the Armed Forces.
4.1.1.2. Promote and encourage others to exercise their voting franchise, if such promotion does not constitute use of their official authority or influence to interfere with the outcome of any election.
4.1.1.3. Join a partisan or nonpartisan political club and attend its meetings when not in uniform, subject to the restrictions of subparagraph 4.1.2.4. (See DoD Instruction 1334.1 (Reference (c).)