ClickHouse v.21.7.7.47

setting max_memory_usage doesnt work for 'create table .. as' queries

for example:
**this query works**
`create table test_table engine MergeTree order by a as
select a_table.a, b_table.b_arr
from (select arrayJoin(range(10000)) as a) a_table
         cross join (select range(10000) as b_arr) b_table
    settings max_memory_usage = 1;`

**this query doesnt work**
`insert into test_table
select a_table.a, b_table.b_arr
from (select arrayJoin(range(10000)) as a) a_table
         cross join (select range(10000) as b_arr) b_table
    settings max_memory_usage = 1;`
With error:
`DB::Exception: Memory limit (for query) exceeded: would use 4.09 MiB`

**Expected behavior**
**this query should NOT work, and setting max_memory_usage should work for all 'select'\'insert'\'create table' queries**
`create table test_table engine MergeTree order by a as
select a_table.a, b_table.b_arr
from (select arrayJoin(range(10000)) as a) a_table
         cross join (select range(10000) as b_arr) b_table
    settings max_memory_usage = 1;`
if (!interpreter->ignoreLimits())
        {
            limits.mode = LimitsMode::LIMITS_CURRENT; 
            limits.size_limits = SizeLimits(settings.max_result_rows, settings.max_result_bytes, settings.result_overflow_mode);
        }
        {
            OpenTelemetrySpanHolder span("IInterpreter::execute()");
            res = interpreter->execute();
        }
        QueryPipeline & pipeline = res.pipeline;
        bool use_processors = pipeline.initialized();
        if (const auto * insert_interpreter = typeid_cast<const InterpreterInsertQuery *>(&*interpreter))
        {
            
            auto table_id = insert_interpreter->getDatabaseTable();
            if (!table_id.empty())
                context->setInsertionTable(std::move(table_id));
        }
        if (process_list_entry)
        {
            
            if ((*process_list_entry)->isKilled())
                throw Exception("Query '" + (*process_list_entry)->getInfo().client_info.current_query_id + "' is killed in pending state",
                    ErrorCodes::QUERY_WAS_CANCELLED);
            else if (!use_processors)
                (*process_list_entry)->setQueryStreams(res);
        }
        
        res.process_list_entry = process_list_entry;
        if (use_processors)