US President Donald Trump and Chinese leader Xi Jinping agreed during talks in Beijing that the Strait of Hormuz must remain open to ensure unimpeded energy supplies, according to a White House statement.