Fourth seed Coco Gauff is through to the quarter-finals of the China Open after Japan’s Naomi Osaka is forced to retire injured in their last-16 match.