**Describe what's wrong**
Request with `DISTINCT`+`LIMIT BY`+`LIMIT` return less rows than provided in `LIMIT`

**Does it reproduce on recent release?**
22.11

**How to reproduce**
The following query from hits table returns less number of rows then provided in LIMIT
```
SELECT DISTINCT
    Title,
    SearchPhrase
FROM hits_v1
WHERE (SearchPhrase != '') AND (NOT match(Title, '[а-яА-ЯёЁ]')) AND (NOT match(SearchPhrase, '[а-яА-ЯёЁ]'))
LIMIT 1 BY
    Title,
    SearchPhrase
LIMIT 10
````
**Expected behavior**
Query returns number of rows provided in `LIMIT`

const ASTPtr & query_ptr,
    const SelectQueryExpressionAnalyzer & query_analyzer,
    const Context & context,
    const Names & keys,
    const AggregateDescriptions & aggregates,
    bool overflow_row,
    const Settings & settings,
    size_t group_by_two_level_threshold,
    size_t group_by_two_level_threshold_bytes)
{
    const auto stats_collecting_params = Aggregator::Params::StatsCollectingParams(
        query_ptr,
        settings.collect_hash_table_stats_during_aggregation,
        settings.max_entries_for_hash_table_stats,
        settings.max_size_to_preallocate_for_aggregation);
    return Aggregator::Params
    {
        keys,
        aggregates,
        overflow_row,
        settings.max_rows_to_group_by,
        settings.group_by_overflow_mode,
        group_by_two_level_threshold,
        group_by_two_level_threshold_bytes,
        settings.max_bytes_before_external_group_by,
        settings.empty_result_for_aggregation_by_empty_set
            || (settings.empty_result_for_aggregation_by_constant_keys_on_empty_set && keys.empty()
                && query_analyzer.hasConstAggregationKeys()),
        context.getTempDataOnDisk(),
        settings.max_threads,