You have a race condition problem. As the config file is read from many places in the application, one copy is made each time and they are updated independently. Thus the last piece of code to save the config file overwrites previous changes that occurred and were saved elsewhere. This is similar to reading, modifying, writing a global string from many places in the application: writing overwrites previous changes that occurred since it was copied.
To prevent this situation, open the config file only once in the application and make the refnum available to all VIs using it. To write a key, use the refnum to write it. Config VIs uses only one copy of that data so you are sure that all keys written and not overwritten. Close the config file only when you a
re done with it at the end of the application. If you need to save the config file after each operation, use the VI "vi.lib\utility\config.llb\Config Data Write to File.vi". This VI saves the config data on file without closing the refnum so the copy remains in memory.