It writes the whole file. Anything that hasn't changed, it writes whatever values it read on startup.
Why is ZQuest writing to the ZELDADX section though? Shouldn't ZQ only write to the ZQUEST settings on exit?
Well, try this and see if it doesn't do it.
I have however, experienced the control settings being lost, but I was not able to reproduce it readily.
Start both programs. Order doesn't matter. Remap a button, then close and reopen ZC. The button should still be changed. Close ZC, then close ZQuest. When you reopen ZC, the change should be reverted.