I wrote a test for  `PART MOVE TO SHARD` runs multiple times and received some unexpected behavior.

**Test description:**
1) Create a table
2) Make 2 rows insert on one shard and 1 row insert on some other
3) Stop Merges
4) Create Distributed table
5) Receive part UUID
6) Move this part multiple times
7) Make concurrent check on the number of rows

**How to reproduce**
1) CREATE TABLE IF NOT EXISTS {table_name} on CLUSTER {cluster_name}
                                                (v UInt64) "
                                                ENGINE = {table_engine}('/clickhouse/tables/replicated/{shard}/{table_name}', '{replica}') 
                                                ORDER BY tuple() 
                                                SETTINGS assign_part_uuids=1,
                                                part_moves_between_shards_enable=1,
                                                part_moves_between_shards_delay_seconds=2;

2) INSERT INTO {table_name} VALUES ({value}) - 2 rows  on one shard and 1 row on some other

3) SYSTEM STOP MERGES {table_name} - on all nodes

4) CREATE TABLE IF NOT EXISTS {table_name_d} as {table_name} 
                                                    ENGINE = Distributed({cluster_name}, currentDatabase(), {table_name})
5) SELECT uuid FROM system.parts where name = 'all_0_0_0'

6) SELECT name FROM system.parts where uuid = '{part_uuid}'
    ALTER TABLE {table_name} MOVE PART name TO SHARD '/clickhouse/tables/replicated/{shard1}/{table_name}' - multiple times

7) select count() from {table_name_d}

* ClickHouse server version to use
22.1.2
* Queries to run that lead to an unexpected result
select count() from {table_name_d}

Result: 4

**Expected behavior**
Result: 3

**Additional information**
If make retries some time result becomes correct. The test gives the correct result if put part_moves_between_shards_delay_seconds=0.

{
    StreamLocalLimits limits;
    limits.mode = LimitsMode::LIMITS_TOTAL;
    limits.size_limits = SizeLimits(settings.max_rows_to_read, settings.max_bytes_to_read, settings.read_overflow_mode);
    limits.speed_limits.max_execution_time = settings.max_execution_time;
    limits.timeout_overflow_mode = settings.timeout_overflow_mode;
    /** Quota and minimal speed restrictions are checked on the initiating server of the request, and not on remote servers,
      *  because the initiating server has a summary of the execution of the request on all servers.
      *
      * But limits on data size to read and maximum execution time are reasonable to check both on initiator and
      *  additionally on each remote server, because these limits are checked per block of data processed,
      *  and remote servers may process way more blocks of data than are received by initiator.
      *
      * The limits to throttle maximum execution speed is also checked on all servers.
      */
    if (options.to_stage == QueryProcessingStage::Complete)
    {
        limits.speed_limits.min_execution_rps = settings.min_execution_speed;
        limits.speed_limits.min_execution_bps = settings.min_execution_speed_bytes;
    }
    limits.speed_limits.max_execution_rps = settings.max_execution_speed;
    limits.speed_limits.max_execution_bps = settings.max_execution_speed_bytes;
    limits.speed_limits.timeout_before_checking_execution_speed = settings.timeout_before_checking_execution_speed;
    return limits;
}
static void executeMergeAggregatedImpl(