The US and Chinese leaders agreed during talks that the Strait of Hormuz should remain open to ensure global supplies.