you will see that Loco Translate created 2 language files for Romanian
Loco Translate does not create two files. WordPress installs the system file, and presumably you created the custom file.
The weird thing is that the strings inside them are not totally the same.
Let’s separate the two parts of this process:
1. When you run a WordPress update you may get new “system” translations installed and you may get a new version of WooCommerce. Hopefully these align. i.e. the WordPress translations should match your version of WooCommerce. This part of the process has nothing to do with Loco Translate.
2. Loco Translate does not automatically update custom translation files when you run an update, or at any other time. If your custom translations are out of sync with the above (point 1.) then you must open your file and press the Sync button. The sync function is documented here. This is deliberately not automatic due to the fact it is a potentially destructive operation.
How can I merge the two files and make sure I won’t lose translations again on the next update?
It’s not necessary to merge the files and you should never lose translations that are still valid. It just requires setting up properly.
On that first point – any translations missing from your custom file will fall back to the system file. That’s why merging them is not required. They are merged at run time by Loco Translate’s custom file loader.
On the second point, any translations that are “lost” will be no longer valid. i.e. their source text changed. (Read about Fuzzy matching in the Sync documentation). If you lose valid translations from the System file then there is an issue with your WordPress updates keeping in sync with the translations. If you lose valid translations from the custom file, try tweaking the fuzziness setting, and make double sure you are syncing to a valid source before you save anything.