Database Association of Target Group Not Maintained

I am provisioning RDS Aurora Postgres Proxy using Terraform (v.1.5.4). I am following the GitHub repository for this. Everything gets provisioned properly. But now I need to update (add 2 more subnets) to this. So when I ran the Terraform Plan, I got to know that the Proxy will be deleted and created again, since Subnets cannot be modified without deletion and recreation. I proceeded with Terraform Apply. However, after completion, I found that the “default” Target Group Identifier has no Associated Databases, which was provisioned earlier correctly by Terraform. Earlier, this used to point to the RDS Cluster Name, but now this association is broken after deletion and recreation. I was surprised to see this since no other setting was modified apart from the subnets. I tried searching a lot and also tried to tweak various settings, but no luck. Can anyone please help me with this?

Found the fix. The issue was with a resource of type aws_db_proxy_target which was not getting executed (not sure why) during the terraform apply. Hence I had to force the execution of this resource every time the proxy was getting recreated. For this, I found the below link and applied a fix.
how-do-i-force-terraform-to-recreate-a-resource
Based on the above link, added the below code to aws_db_proxy_target resource and then it got resolved.
lifecycle {
replace_triggered_by = [
aws_db_proxy.this[0].id
]