Both are grammatically correct. I would lean towards the first one being semantically preferable. Playing and losing happen together; the losing doesn't happen separately once the playing is done.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.