Like you understand U.S. domestic law and international law are different things. Under international law the head of state is immune for all acts during their term of office: heads of state might not be immune for jus cogens violations under international law but probably are in fact. Their immunity however ends as to unofficial acts after their term of office, and international crimes are obviously not official acts, a fortiori violations of jus cogens (say, bombarding civilians in Aleppo, for one example). Under U.S. domestic law the better view is that the U.S. President enjoys no immunity as to unofficial acts i.e. crimes even during their term of office. This is because the U.S. constitution is not a treaty between sovereignt states but an organic act of the constituent people (Whites, Blacks, civilized Indians and their descendants and immigrants). U.S. constitutional rights and duties are not derived from international law but are expressed by the popular will of the American citizenry. We can see that the U.S. President does not enjoy criminal immunity from the constitution itself. Nowhere does the constitution provide for presidential immunity. Quite the opposite the U.S. constitution provides that the head of state may be "shall be removed from Office on Impeachment for, and Conviction of, Treason, Bribery, or other high Crimes and Misdemeanors". Some legal commentators and political pundits appear to be taking Nixon's line on so-called presidential immunity, a line he most likely got from Kissinger. Of course, German constitutional law (and Kissinger was born in Germany) does provide for presidential immunity. This is because the German state formed as a treaty arrangement between independent countries and thereafter was destroyed by two world wars featuring all varieties of official criminality: to maintain the social peace and to prevent selective prosecution the German Chancellor and Members of the German Parliament enjoy a certain immunity which, fortunately, has become less relevant in the past decades.