Refactoring from locals to default tags

We are upgrading to Terraform v0.12.31 and AWS provider v3.39.0

Our current terraform configuration looks like this -

provider aws {
version = “3.39.0”
}

locals {
common_tags = {
Source = var.source_tag
Team = var.owner_tag
Name = “{var.environment_id}-{local.service_name}”
Solution = local.service_name
SupportCategory = var.support_category_tag
Lifecycle = var.lifecycle_tag
Project = var.project_tag
EnvironmentType = var.environment_type_tag
Environment = var.environment_id
Contact = var.contact_tag
Product = var.product_tag
BusinessUnitID = var.business_unit_id_tag
Component = local.service_name
LastModifiedTime = timestamp()
LastModifiedBy = data.aws_caller_identity.current.arn
}
}

resource aws_dynamodb_table xyz {
tags = local.common_tags
}

When we run the terraform files, getting below error -

Provider produced inconsistent final plan
When expanding the plan for aws_dynamodb_table.xyz to
include new values learned so far during apply, provider
registry.terraform.io/-/aws” produced an invalid new value for .tags_all: new element “Contact” has appeared.
This is a bug in the provider, which should be reported in the provider’s own issue tracker.

The same configuration works when we manually delete the existing Dynamo DB table and re-run the files. But we want to avoid getting this error in first place. What changes do we need to make in our files to avoid this error ?