The US President has absolute immunity from criminal liability for committing frivolous crimes punishable by up to six months of the arrest or a fine of less than $5000. Among reasons for the attraction of the President to criminal responsibility, the US Constitution notes treason, bribery, or other serious crimes and offenses. In this regard, Congress granted the right to dismiss the impeachment to the President.
In my opinion, the President cannot act illegally if he acts in the interests of the country. In other words, these actions are lawful a priori as the interests of citizens are also in the framework of the law. Despite the fact that the US President has a significant amount of authority, he could exercise it only in respect of the federal bodies of the executive power. The US Congress and the Supreme Court are independent of the President and act as equal partners in all political relationships. As a result, none of the US Presidents could significantly affect any questions concerning domestic or foreign policy.
An example of when this system of checks, balances, and public scrutiny has made it impossible to expand presidential powers is the resignation of President Richard Nixon in 1974. Nixon tried to strengthen the executive power and made serious violations of legality (the so-called Watergate scandal). As a result, Congress, the Supreme Court, and non-governmental organizations forced Nixon to resign voluntarily. In this regard, his actions were not supported by the absolute immunity doctrine. Besides, none of the Presidents was dismissed, but there were three attempts to impeach Andrew Johnson in 1868, Richard Nixon in 1974, and Bill Clinton in 1998. For example, Andrew Johnson vetoed the bill concerning conditions of return assumptions of the southern states to the Union that was almost unanimously adopted by Congress, as well as to civil equality of Afro-Americans. This case was considered unlawful, and the presidential immunity was addressed as an abuse of authority.