If you are referring to the capability gradereport/grader:view and have taken that away from the Teacher role, then they can still access the Export reports, since it is checking for separate capabilities 'moodle/grade:export' and gradeexport/txt:view. These are distinct capabilities.
In fact, even if you remove the 'moodle/grade:viewall' capability, a user with the export capabilities can still use the direct url to the export download as long as they have those two export permissions.
Two attachments show this: the user can not see the Grades but can use the url to the Export the grades okay.