How do I set the config settings for Android in Capacitor without resetting them on build

Every time I run npx cap sync or ionic capacitor run android my config settings are reset.

e.g. in the android folder
config.xml file
build.gradle file

Do I set these in the capacitor.config.json file?