Didn’t the precedent North Korea leader Kim Jon il visited Japan and the USA with his son in the 90’s?
They used Brazilian passports but the trip was secret.
The only way that I could see that it could remotely constitute and act of war is if they were denied entry and forced their way in (President Putin entering Monrovia backed up by a tank battalion would definitely count), or if they were planning to do something particularly egregious while they were there, (say meet with rebel leaders to plan a coup).
quite recently, Argentine’s Milei pulled some stunts in Spain and Chile. Visiting the country in a “not-a-state-visit” regime, but having all kinds of political meetings, and insulting a couple of dignitaries, b/c reasons.
In Chile he asked if the sitting president could visit him at night in his hotel for talks… did not happen and was universally seen as “poor taste” - and of course the fact that both presidents are from opposites ends of the political spectrum, did not help much.
but, ultimately, no shots were fired
Remember that most heads of state are much less well-known than the American (or British) head. Most could travel quite anonymously
In the 19th century, European monarchs would often use one of their many lesser titles, or a title made up for that purpose, to travel abroad in a private capacity. Not exactly to keep the trip secret - they knew they’d be recognised. The point was to save the authorities of the destination country the need to receive them with all the pomp that diplomatic protocol would otherwise require.
This is actually the original meaning of the word incognito. Examples of such incognito titles are Countess Balmoral (Queen Victoria), Count Borodinsky (Russian tsar Alexander II) or Count Hohenems (Austrian emperor Francis Joseph).
Heads of states and heads of governments travel to other countries all time time for private or for non-ceremonial official purposes. In a number of cases their citizenship also qualifies them for visa free travel (e.g. for EU citizens to other EU countries, UK and Irish citizens to the other country, etc.)
The sticking point would probably be security - even the Prince of Liechtenstein (pop. ~40k) probably travels with a discreet armed bodyguard. Countries take a dim view of other countries’ armed officers operating in their country without that being cleared, so there would be a lightweight diplomatic procedure to clear visits.
Example: the current President of Germany vacations several times a year hiking and relaxing in the Alps of Southern Tyrol, Italy. Were it not for the security issue he would be entitled to just drive over, with nobody in the Italian government any the wiser (as Germany and Italy are in the Schengen zone, and there is free travel).
and so is Austria, which needs to be crossed to go from GER to ITA
The most famous incident where this almost happened was during the French Revolution when King Louis fled the capital in disguise and tried to make it to Austrian controlled territory but was spotted and forced to return before he reached safety:
It’s a very important point in the history of the French revolution and led directly to his execution (it was definitely assumed, correctly, that he planned to raise an army overseas and return to roll back the revolution by force)
George W. Bush did that during the Iraq War to serve Thanksgiving dinner to soldiers on the front line.