### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

As part of our test suite, we setup DynamoDB tables starting from initial table creation to a set of updates we've made over time. The tables are created and updates are applied successfully, so we begin to run our tests but when our tests run quickly, we end up getting an `Index not found` error returned when searching against a global secondary index that was created as part of an update table operation.

### Expected Behavior

The expected behavior should be that we should be able to query against the updated secondary index that has been created in a table.

### How are you starting LocalStack?

With a `docker run` command

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

    docker run localstack/localstack

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

We have an internal set of migrations we run against DynamoDB that get the tables to the state that we expect. The main issue pops up when we do a replication update as part of a table update operation and then do the global secondary key creation. When doing the replication update, the schema gets cached internally and a bad version of the schema stays valid until the initial TTL expires (20s default).

### Environment

```markdown
- OS: Mac OS Ventura (Docker 4.23.0)
- LocalStack: latest (also tried 2.2.0, and some older versions)
```


### Anything else?

_No response_
regex = r"^\s*(UPDATE|INSERT\s+INTO|DELETE\s+FROM)\s+([^\s]+).*"
    match = re.match(regex, statement, flags=re.IGNORECASE | re.MULTILINE)
    return match and match.group(2)
def dynamize_value(value):
    """
    Taken from boto.dynamodb.types and augmented to support BOOL, M and L types (recursive), as well as fixing binary
    encoding, already done later by the SDK.
    Take a scalar Python value or dict/list and return a dict consisting of the Amazon DynamoDB type specification and
    the value that needs to be sent to Amazon DynamoDB.  If the type of the value is not supported, raise a TypeError
    """
    dynamodb_type = _get_dynamodb_type(value)
    if dynamodb_type == "N":
        value = {dynamodb_type: _serialize_num(value)}
    elif dynamodb_type in ("S", "BOOL", "B"):
        value = {dynamodb_type: value}
    elif dynamodb_type == "NS":
        value = {dynamodb_type: list(map(_serialize_num, value))}
    elif dynamodb_type in ("SS", "BS"):
        value = {dynamodb_type: [n for n in value]}
    elif dynamodb_type == "NULL":
        value = {dynamodb_type: True}
    elif dynamodb_type == "L":
        value = {dynamodb_type: [dynamize_value(v) for v in value]}
    elif dynamodb_type == "M":
        value = {dynamodb_type: {k: dynamize_value(v) for k, v in value.items()}}
    return value
def _get_dynamodb_type(val, use_boolean=True):