When using deployment slots in Azure Web Apps the appsettings and connectionsstrings are changed when swapping slots.
E.g. the production environment slot has the “production” version of appsettings and connectionstrings and the pre production slot has its own version of those settings in the web.config file.
This is default behaviour, unless you use the app settings in the Azure portal for the environments (overrides web.config file) or check the “Slot setting”. (setting will “stick” with the swap).
Read more here:
Configure web sites: