Azure Function Slot usage workflow issue

Hi there,
Here is my issue : when azurerm_function_app.app_settings are updated (new setting), terraform reset all “swaped setting” and old source version is back in production.

Details steps:
I have a function and a slot defined in my terraform template, both with same setting (keep it simple).
For the first deployment i have no issue, everything is deployed, i use azure-cli to deploy source-code inside my “blue-slot”, and after testing purpose, i use azure-cli to swap source-code to “production” slot. All is working fine.
But now if i add in terraform a new app_settings for my function (same for slot and main function), during terraform apply, as app_settings has changed for the azurerm_function_app, all the setting was reset, so my WEBSITE_CONTENTSHARE is “re-swap” and my old-version (still in blue-slot) is back in production (in this init state, empty source-code back to life…).

My question is, i can’t find a consistent workflow using terraform to handle slot and application setting lifecycle correctly. Is someone have a working workflow fully automated using terraform and function slot?
Maybe i think it wrong way but can’t find a solution… Any help or idea are welcome!