Changing to BOSS DAC disables TouchScreen

Whenever I change the audio source, say from anything to anything else, the config.txt file gets overwritten to default. The settings which I added for touchscreen get removed and the touchscreen displays only horiz lines. Then I have to take out the SD card, modify config.txt again and reboot.

Can the error in the logic be corrected so that config.txt is preserved on a DAC change.