Terragrunt makes this sort of change to backend.tf depending on which command is run:

I haven't pinned down the exact behavior but it seems unnecessary.
Ah, interesting... This is usually caused by looping over a map in Go, where iteration order is randomized. We should probably pull out the keys and sort them to iterate in a stable order. If anyone has time to fix this, a PR is very welcome!
FYI there is a PR with the fix here: https://github.com/gruntwork-io/terragrunt/pull/1165
This will be also solved on the version 0.24.X ?
Most helpful comment
FYI there is a PR with the fix here: https://github.com/gruntwork-io/terragrunt/pull/1165