BIARRITZ, France — For a day, at least, everyone was on their best behavior when the cameras were on, eager to present a show of bonhomie after so many previous meetings ended in discord.

But behind the scenes at the annual gathering of some of the world’s leading powers, President Trump still found himself at odds with his counterparts on Sunday over issues like trade, climate change, North Korea, Russia and Iran.

Ever so gingerly, as if determined not to rouse the American’s well-known temper, the other Group of 7 leaders sought to nudge him toward their views on the pressing issues of the day, or at least register their differences — while making sure to wrap them in a French crepe of flattery, as they know he prefers.

It was far from clear the messages were received, or in any case at least welcome.

Like other presidents, and perhaps even more so, Mr. Trump tends to hear what he wants to hear at settings like this, either tuning out contrary voices or disregarding them. Through hard experience, other leaders have concluded that direct confrontation can backfire, so they have taken to soft-pedaling disagreements.