Naomi Osaka spent time away from tennis in recent years, first for mental health breaks, then because she became a mother.