The second version sounds the same. There are still two beats in a bar, so we keep the 2 at the top of the time signature.
But notice the 2 at the bottom of the time signature, too - that means that we're counting half-notes now, that a half-note has been chosen to last one beat. And - you might want to pour yourself a drink here - that means that a quarter-note is now half a beat, and an eighth-note a quarter of a beat . . . . no problem, just loooong-short-short . . .