The rush to curry Trump’s favor makes clear just how much global leaders learned their lesson from his first term.