The US president had been due to pose for a photo opportunity with President Mauricio Macri and other world leaders as the G20 Summit drew to a close.
Mr Trump shook hands with Mr Macri, and the two leaders were supposed to remain in place for the group shot.
But the US president simply wandered off chased by an aide.
He is then heard off camera saying: "Get me out of here."
Mr Trump did eventually pose for the group photo with other world leaders.
It is not the first time Mr Trump has wandered off. In Israel in May 2017, Trump began walking out of a photo opportunity with Prime Minister Benjamin Netanyahu.
On October 12, 2017 Trump gathered a number of officials in the Oval Office to sign an executive order on the Affordable Care Act.
Mr Trump shook hands with the assembled guests, and then wandered off, apparently forgetting to sign the document.
Vice President Mike Pence told him it needed a signature. Mr President, you need to sign it,' Mr Pence said.
At the end of the G20 summit Theresa May said she will be the Prime Minister to take the UK out of the European Union.
She indicated she does not believe her premiership will end with Brexit, insisting "there's a lot more for me still to do".
She said that world leaders had expressed their desire for "certainty" about the UK's future position.
She arrives back in the UK on Sunday, ahead of an intense week of efforts to shore up support in Parliament for her Brexit deal ahead of the crucial December 11 vote.
"The next nine days are a really important time for our country, leading up to the vote on this deal," she told a press conference in Buenos Aires.
"I will be talking with Members of Parliament obviously and explaining to them why I believe this is a good deal for the UK, why it is a deal that delivers on Brexit but it is also a deal that protects jobs and the economy, and why passing this deal in the vote that takes place in the House of the Commons will take us to certainty for the future, and that failure to do that would only lead to uncertainty.
"I think what people want, and what I've been hearing here at the G20 is the importance of that certainty for the future."
Asked what she would like her legacy to be if she is forced out of her job as a result of Conservative divisions over Brexit, Mrs May replied: "There is a lot more for me still to do, not least delivering on Brexit and being the Prime Minister that does take the United Kingdom out of the European Union."
Opportunities for trade in the wake of Brexit were at the top of Mrs May's agenda for the two-day summit in which she held face-to-face talks with leaders of key targets for deals, including Australia, Canada, Japan, Turkey and Chile.
The Prime Minister said the summit had been "productive", with "friends and partners making clear that they are keen to sign and implement ambitious free trade agreements with us as soon as possible."
Japanese PM Shinzo Abe issued an appeal to avoid a no-deal withdrawal from the EU, urging her to "ensure transparency, predictability as well as legal stability in the Brexit process".
His plea follows warnings from Japanese companies with operations in the UK, such as Honda and Nissan, of the additional costs and bureaucracy they would face from a no-deal outcome.
Asked whether she had been able to reassure Mr Abe that she would not allow no-deal to happen, Mrs May said only that she believed she had negotiated a good deal which would allow UK-based Japanese firms to maintain trade relations with Europe.
She said she had spoken with Japanese investors in the UK, adding: "One of the key messages they have given is about the importance of being able to maintain a good trade relationship with the EU when we have left.
"That's what the deal that has been negotiated delivers."
Earlier in the day, Mrs May used a meeting with Turkish president Recep Tayyip Erdogan to discuss Ankara's investigation into the death of journalist Jamal Khashoggi at Saudi Arabia's consulate in Istanbul in October.
On Friday, Mrs May shook hands with Saudi Crown Prince Mohammed bin Salman before delivering what she described as a "robust" message on the importance of a "credible and transparent" investigation into Mr Khashoggi's death.