As Peter Beinart pointed out in the Atlantic, this is a pattern with Trump. He insults foreign leaders mercilessly from afar but becomes obsequious and compliant in their presence. This goes back to his earliest such interaction during the 2016 campaign. Remember when he made that bizarre trip to Mexico to meet with President Enrique Peña Nieto and said it was a “great, great honor,” insisting he had “tremendous feelings” for the people he'd been demeaning for months as rapists and criminals? After that meeting, Trump flew straight to Phoenix and gave one of the most outrageously xenophobic speeches of his outrageously xenophobic campaign, praised by Ann Coulter as "the most magnificent speech ever given." He is, in other words, a "sniveling coward," in the words of no less an authority than Ted Cruz (now of course a loyal sycophant). It's obvious that world leaders have figured this out.
Source : https://www.salon.com/2017/11/13/everybody-owns-trump-but-with-vladimir-putin-its-special/