It is more the other way around. The Constitution’s treason clause is not self-executing. While it does in a manner of speaking “provide for punishment of the crime,” it does not specify that punishment, but leaves it up to Congress:
Thus the Constitution defines the minimum elements of treason, and establishes some minimum due-process standards, but leaves the details up to legislation. The federal criminal code accordingly provides
The provisions that Convict and Nametag have cited from the Uniform Code of Military Justice likewise provide for defining and punishing treason committed in the armed services. It is not a case of “where the UCMJ stops and the Constitution takes over.” Like many constitutional provisions, the Constitution contains a grant of authority to the federal government and some basic general provisions about how that authority is exercised, then leaves the particular details up to Congress. Here, Congress has exercised that authority by enacting provisions in the Uniform Code of Military Justice that cover treason in the armed services, in addition to a general criminal statute that covers treason in the civilian context.