Both C major and G mixolydian have the same constituent notes, so how can I tell whether a piece is in one or the other?
The whole point of recognising a set of notes that could belong to seven different modes is where 'home' is perceived.
Home is where the piece feels at rest, like it coud be finished at that point. It's much easier to establish that in key C (C Ionian), because often the final cadence is perfect, which involves V>I (G>C). Since the B note (leading note) from C major is the one semitone away from the root, it just feels right.That works for single notes, and also, probably more convincingly, for chords (triads will do).
For a piece in G Mixolydian, though, there's no leading note - the seventh note in that scheme is a tone away from the root. However, if there's a bit of a blues feel to the piece - due to m7 being present - that's a pointer. And if the piece keeps coming back to G (as a note or chord), then that's another pointer.
If you feel that the 'home note' is C, then it's C major (or maybe C Ionian!)
If you feel that the 'home note' is G, then it's G mixolydian.
Maybe you can't hear a clear home note? In that case, the piece may simply not have a single clear 'key' or 'mode'. The key or mode of a piece is not always an absolute, objective fact. It's more like a perspective from which the piece may be analyzed.
In C major the root tone is C the dominant is G The melody ends on the root tone or eventually on a chord note of C.
In G mixolydian the root tone is G. You will also find a kind of “dominant” tone, it’s called the tenor or repercussio (also named repetitio as it is mor often repeated) in Gregorian chant: this is the 5th (D). The final tone is G and so there is no leading tone as we have F-G (= minor7 = 2 semitones below the root tone.
This tenor tone has nothing to do with the Tenor Part (SATB).