Yes but seeking knowledge is wajib isnt it. South African darul ul ulooms doesnt put any condition for foreign female students to be accompanied by mahrams when coming from abroad to the darul ul uloom or returning back home (or there are such conditions which i am not aware of maybe). So i would presume that it is something acceptable since those Darul ul Ulooms are run by high calibre ulemas