In general, you cannot be involuntarily deprived of US citizenship.
In Afroyim v. Rusk, the Supreme Court interpreted the citizenship clause of the 14th Amendment to the US Constitution, which reads as follows:
All persons born or naturalized in the United States and subject to the jurisdiction thereof, are citizens of the United States and of the State wherein they reside.
The Supreme Court ruled that there is nothing in the Constitution or its amendments which empowers Congress to revoke a person's citizenship after it has been constitutionally bestowed. A person may voluntarily renounce their citizenship, either explicitly, or by performing any of a number of acts with intent to lose citizenship. But the US is not entitled to assume that intent exists; US consular officials generally follow a policy of asking whether denaturalization was intended, and then taking the person's word for it.
(In principle, Congress might be able to revoke the citizenship of Americans born abroad to citizen parents, or of Native Americans, because both of those groups obtain citizenship by statute rather than Constitutional mandate. But Congress has shown no interest in doing so.)
Political activities are protected speech.
It is extremely well-established that the First Amendment protects political speech from (US) government interference. Johnson's becoming Prime Minister is at the heart of these protections, and any law which purported to directly forbid it would be blatantly unconstitutional.
Nevertheless, heads of state or government do occasionally do things which might be illegal under "regular" US law. Ordinarily, when they travel to the United States, they are protected by diplomatic immunity. But as discussed below, a US citizen head of state or government might be formally ineligible for this protection because the US would be entitled to treat them as if they were solely a US citizen. Informally, however, in most situations, the US is unlikely to prosecute a head of state or government, because of the severe diplomatic repercussions of doing so. This is especially true if the foreign government is a close ally such as the UK.
However, there might be immigration difficulties.
Foreign heads of state and heads of government* are always issued A-1 visas regardless of specific circumstances. However, under US immigration law, US citizens are categorically ineligible for any kind of visa, and are instead required to enter with their US passport. So it's a bit of an open question how a US citizen head of government would go about traveling to the US in this scenario. Furthermore, the Master Nationality Rule might cause problems in the (unlikely) event that the citizen attempts to assert diplomatic immunity for some alleged crime.
On the other hand, it is likely that these issues would be worked out if and when they arise. They would certainly not be grounds for demanding that a head of government renounce their citizenship before traveling to the US. In fact, as a general principle of customary international law, the US is not permitted to refuse US citizens entry into the United States. Instead, USCIS and other branches of the US immigration apparatus would have to update their regulations to accommodate such a person.
Of course, Johnson might choose to renounce his US citizenship. If he did so, then none of the above problems would apply. According to a comment on the question, he has in fact done so, so this question is purely hypothetical.
* Johnson would fall into the latter category, as the head of state of the UK is the monarch.