The secret event was her last before she and Prince Harry step down as senior members of Britain’s royal family.