It’s tenor clef, not alto and this part of the piece is pretty solidly in G-major. There aren’t any cadences in E-minor that I can see and if there were it would be tipped off by some leading tones (d#s) in that key.
Key signature isn’t always a clear indication of the actual key, there are many instances in the baroque era of the key in a particular selection being out of step with the stated key signature found in the left margin. Pieces that are absolutely in the key of Gm with only one flat in the key signature for ex.