Does the I-797A's I-94 kick in if you travelled abroad and re-entered before the valid-from date?

I’m currently within the US with H1B status. Status (along with existing petition and I-94) was going to expire on June 26th. My extension petition was approved in April with a new paper I-94 issued along with the I-797A Approval Notice. The approval notice as well as the paper I-94 have a valid-from date of June 27th.

I traveled abroad and re-entered the US on May 7th. Upon re-entry, I was given an I-94 with a valid-until that was 3 years from the date of re-entry: May 6th 2025. A few days later I had to visit the CBP Deferred Inspection site. They said that the I-94 issued upon re-entry was wrong and it should have had a validity of until June 26th. They said that on June 27th the I-94 that was attached to the I-797A will come into effect. Because the online I-94 was wrong, they “fixed” it by changing the valid-until date to June 26th 2022.

I was under the impression that the I-94 attached with the I-797A is only valid till the time you exit the country and re-enter. I’m now worried about whether they are right about this or if I will start accruing illegal presence from June 27th.