TMD cross-section factorization for dijet production at the EIC