Adding this section to Loki configuration solved the issue:
ingester: query_store_max_look_back_period: -1