### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

After the initial `cdklocal deploy` run, after any change has happened, Localstack will not be able to locate the created SQS queue and will delete it.
![Screenshot 2023-12-08 at 10 16 15](https://github.com/localstack/localstack/assets/16351444/f7a29aa3-43f9-41b2-bba1-c71b1fbc2d8b)


### Expected Behavior

No error when adding changes after having provisioned SQS queue

### How are you starting LocalStack?

With the `localstack` script

### Steps To Reproduce

How to replicate:
1. In an empty folder initialise a new CDK project using `cdklocal init -l python`
2. Substitute the `..._stack.py` file with.
```
from aws_cdk import Duration, Stack, aws_sqs as sqs, aws_s3 as s3
from constructs import Construct


class LocalstackTestStack(Stack):
    def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
        super().__init__(scope, construct_id, **kwargs)

        # The code that defines your stack goes here

        # example resource
        queue = sqs.Queue(
            self,
            "LocalstackTestQueue",
            visibility_timeout=Duration.seconds(300),
        )
```
3. Run `cdklocal bootstrap`and `cdklocal deploy`.
4. Make any "significant" change in ..._stack.py file. For example add a bucket.
```
from aws_cdk import Duration, Stack, aws_sqs as sqs, aws_s3 as s3
from constructs import Construct


class LocalstackTestStack(Stack):
    def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
        super().__init__(scope, construct_id, **kwargs)

        # The code that defines your stack goes here

        # example resource
        queue = sqs.Queue(
            self,
            "LocalstackTestQueue",
            visibility_timeout=Duration.seconds(300),
        )

        self.input_bucket = s3.Bucket(
            self,
            "input_bucket",
            block_public_access=s3.BlockPublicAccess.BLOCK_ALL,
        )
```
5. Run `cdklocal deploy`. This will throw the error.


### Environment

```markdown
- OS: macOS Sonoma Version 14.1.1
- LocalStack:

> cdklocal --version
2.114.1 (build 02bbb1d)

>localstack --version
3.0.2
```
```


### Anything else?

![Screenshot 2023-12-08 at 10 21 44](https://github.com/localstack/localstack/assets/16351444/e9960a4e-6c39-4827-9550-b71606125a77)
![Screenshot 2023-12-08 at 10 21 59](https://github.com/localstack/localstack/assets/16351444/7f2e67a1-4d27-482f-8dae-8263f8e7d63d)

`localstack config show` output
primary_id_path = primary_id_path.replace("/properties", "")
    parts = [p for p in primary_id_path.split("/") if p]
    resolved_part = resource_props.copy()
    for i in range(len(parts)):
        part = parts[i]
        resolved_part = resolved_part.get(part)
        if i == len(parts) - 1:
            
            return resolved_part
    raise Exception(f"Resource properties is missing field: {part}")
class ResourceProviderExecutor:
    """
    Point of abstraction between our integration with generic base models, and the new providers.
    """
    def __init__(
        self,
        *,
        stack_name: str,
        stack_id: str,
        provider_config: dict[str, str],
        
        resources: dict[str, dict],
        legacy_base_models: dict[str, Type[GenericBaseModel]],
    ):
        self.stack_name = stack_name
        self.stack_id = stack_id
        self.provider_config = provider_config
        self.resources = resources
        self.legacy_base_models = legacy_base_models
    def deploy_loop(