activating and deactivating groups and directing effect
I believe that if we ignore the inductive effects of the substituents for the time being, then the electron-donating group(which donates electrons via resonance effect) would manage to activate a few positions in one or more resonating structures, and the electron-withdrawing group can only take up this delocalized pair of $\pi$ electrons when it is present at exactly an ortho or para position where the $\ce{+M}$ effect operates, and the negative charge lies on the carbon alpha to the electron-withdrawing group.
It can be seen here that the negative charge in the resonance structures of $2,4$-dinitroaniline can be taken up by the nitro group only when the negative charge becomes alpha to it:

So the only way an electron-withdrawing group can &quot;win&quot; is if it placed against a very poor electron-donating group.
First, in the case of $\ce{-CH3}$ or halogens (who neither use $\pi$ conjugation for electron donation nor have an electron-donating nature), the electron density donated to the ring is unable to emerge in the intermediates without being delocalised by the EWG, or second when the EWG is present exactly at positions where the negative charge reaches by $\pi$ conjugation(in case of &quot;strong&quot; electron donators).
If the group donating via the $\pi$ bonds is even a relatively better donating group, then unless all the ortho and para positions are having electrons being withdrawn by the presence of electron withdrawing groups, there will always be resonance structures donated having some partial activation at ortho or para positions.
Hence, the electron-donating group &quot;wins&quot; in such situations unless there is no steric hindrance during the substitution taking place.