China’s military has accused the United States of engaging in risky behaviour in the Taiwan Strait after two US naval ships transited the international waterway.