Two-time US Open champion Naomi Osaka earned her most impressive win since giving birth by knocking out American third seed Coco Gauff to reach the quarter-finals in New York.