We generalize the framework of chiral effective field theory to study the interactions of the isovector $D^\ast\bar{D}^{(\ast)}$ and $B^\ast\bar{B}^{(\ast)}$ systems up to the next-to-leading order, in which the long-, mid-, and short-range force contributions as well as the $S$-$D$ wave mixing are incorporated. Based on the Lippmann-Schwinger equation, we fit the invariant mass distributions of the elastic channels measured by the BESIII and Belle Collaborations. Our results indicate that the four charged charmoniumlike and bottomoniumlike states $Z_c(3900)$, $Z_c(4020)$ and $Z_b(10610)$, $Z_b(10650)$ can be well identified as the $D\bar{D}^{\ast},D^\ast\bar{D}^{\ast}$ and $B\bar{B}^{\ast},B^\ast\bar{B}^{\ast}$ molecular resonances. The bound state explanations are vetoed in our framework. Our study favors the $Z_c$ and $Z_b$ states are the twin partners under the heavy quark symmetry.