How to use loadByProperties when one of the properties is an array? I have this configuration entity and I want to load an entity using the properties label and subregions

Lets say I want to load the entity if it has the label CU and the subregions CU-04. Note that subregions is an array. I tried with this code but is not working.
$region = $this-&gt;entityTypeManager-&gt;getStorage('region')-&gt;loadByProperties(['label' =&gt; $region, 'subregions' =&gt; $subregion]);

How can I call loadbyProperties with properties being arrays?
Configuration entities are not queried via SQL, you search within a multilevel array.
See the code docs:
core/lib/Drupal/Core/Config/Entity/Query/Query.php
  /**
   * Overrides \Drupal\Core\Entity\Query\QueryBase::condition().
   *
   * Additional to the syntax defined in the QueryInterface you can use
   * placeholders (*) to match all keys of an subarray. Let's take the follow
   * yaml file as example:
   * @code
   *  level1:
   *    level2a:
   *      level3: 1
   *    level2b:
   *      level3: 2
   * @endcode
   * Then you can filter out via $query-&gt;condition('level1.*.level3', 1).
   */
  public function condition($property, $value = NULL, $operator = NULL, $langcode = NULL) {
    return parent::condition($property, $value, $operator, $langcode);
  }

In your case the second level keys are the same as the values. So you have to ignore the second level with an * to query these values.