H4 I-94 dates mismatch between CBP and USCIS

My wife’s H4 VISA stamped on her passport is valid until 9/12/2024 but on her arrival to USA, the CBP agent gave I-94 admit until date as 8/16/2024 because her passport expires on that date.

I have renewed her passport and also has got approval for her H4 renewal from USCIS.

The new I-94 that USCIS sent us with the I-797A has the I-94 date valid starting 9/12/2024 until 9/11/2027 (This matches with my H1B approval dates also).

There is a difference of 27 days between the expiry date (8/16/2024) on I-94 issued by CBP on her entry to USA and the new I-94 valid start date (9/12/2024) issued by USCIS.

Will these 27 days be considered illegal even though the H4 VISA is valid until 9/12/2024 but I-94 expires on 8/16/2024 and approved I-94 has validity starting 9/12/2024?

I checked about this with my attorney who filed the H1B/H4 extension and he says it should not be a problem because USCIS knew about it and made the decision.

I am bit concerned that the attorney might be incorrect and wanted to get more information if this could cause any problems if that 27 days being considered as an illegal stay.

Any advise or suggestions will be greatly appreciated in this matter.

I actually agree with your attorney that the I-94 gap for H4 dependent may not be of a concern.