Inconsistent result after apply hostnames[1]: was cty.StringVal("") now cty.StringVal("")

I’m encountering an issue with my custom provider with The provider framework.
when trying to apply changes to the custom_hostname attribute. After running terraform apply, I receive an error message stating that the provider produced an inconsistent result, with a specific discrepancy in the hostnames array.

The error received is as follows:

│ Error: Provider produced inconsistent result after apply
│ When applying changes to example_tenant_configuration.tenant_configuration["example"], provider "provider[\"\"]" produced an unexpected new value: .hostnames[1]: was cty.StringVal(""), but now
│ cty.StringVal("").

Here is a high-level overview of the code:

// Struct representation of the tenantModel
type tenantModel struct {
	ID             types.String `tfsdk:"id"`
	Hostnames      types.List   `tfsdk:"hostnames"`
	CustomHostname types.String `tfsdk:"custom_hostname"`

// Schema defines the schema for the resource.
func (r *tenantResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
	resp.Schema = schema.Schema{
		Attributes: map[string]schema.Attribute{
			"id": schema.StringAttribute{
				Computed: true,
				PlanModifiers: []planmodifier.String{
			"hostnames": schema.ListAttribute{
				ElementType: types.StringType,
				Computed:    true,
				PlanModifiers: []planmodifier.List{
			"custom_hostname": schema.StringAttribute{
				Required: true,

// Update function to change tenant's properties
func (r *tenantResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {
	var plan, state tenantModel

	if !state.CustomHostname.Equal(plan.CustomHostname) {
                // Update logic
		// Attempting to set the updated hostnames list
		plan.Hostnames = conv.StringsToStringList([]string{tenantHostname, plan.CustomHostname.ValueString() + ""}, true)

	// Logic to set the state with the updated plan
	resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...)
	// ...

// ...

Here’s the expected behavior when using the provider to manage the tenant resource:

  1. Initially, custom_hostname is set to "", resulting in hostnames like ["", ""].
  2. The custom_hostname attribute is then updated in the Terraform configuration to "".
  3. I would expect the hostnames after running terraform apply to read ["", ""].

Given this scenario, I am reaching out to the community for insights. Is there a specific approach or a common pitfall in list attribute management in Terraform providers that I might be missing?