Great question, and great observation!
You are correct that the two scales contain the same pitches, but where they differ is in their harmony, and tonal center. Where the E minor scale focuses around E, the A dorian scale focuses around the pitch A. This means that in a piece of music built from the E minor scale we are going to feel a sense of resolution typically when the piece returns to that E. The piece will most likely begin with an E minor harmony, and then throughout the phrase, or section, it will move somewhat away from that E but ultimately return home to E for resolution. Same thing for the A dorian scale.
So, you're next question may be, "sure, but if the pitches are the same, then how is that sense of resolution created?"
Remember how we create harmonies is by stacking thirds, so for E natural minor we might expect EGB built on E, and ACE built on the 4th scale degree; BDF# built on the 5th scale degree, though in a minor key we would almost always raise the leading tone to get a major triad built on the 5th scale degree.
...but look how that all changes with the A dorian: We still have a minor triad built on the first scale degree: ACE, but then we have a major chord built on scale degree 4, DF#A as opposed to the minor triad built on scale degree 4 of the E natural minor scale, and finally an E minor chord built on scale degree 5, EGB.
If we compare all the harmonies we can really start to see the differences:
For A Dorian
ACE (minor i)
BDF# (minor ii)
CEG (major III)
DF#A (major IV)
EGB (minor v)
F#AC (diminished viº)
GBD (major VII)
For E minor
EGB (minor i)
F#AC (diminished iiº)
GBD (major III, or III+ with raised leading tone GBD#)
ACE (minor iv)
BD#F# (major V, raising the leading tone)
CEG (major VI)
D#F#A (diminished viiº)
Dorian, in a nutshell, is going to get its Dorian-ness from that minor dominant. Each mode has its own fingerprint that can be uncovered when you start to take a look at the harmonies it creates.