This is pretty normal behavior - when you use the Get{Open,Save}FileName functions, Windows changes the process' (yes, it's per-process and not per-thread!) current working directory, and you have to actively save/restore the CWD if you don't want that behavior.
Keep in mind that OFN_NOCHANGEDIR "is ineffective for GetOpenFileName", so you might want to do manual CWD save/restore even though that flag exists. I seem to recall OFN_NOCHANGEDIR not working on some (ancient by now
) Windows versions, but might just have confused that with not having effect for GOFN.