L1 to H1B trasnfer

Hi,
I am.currently on L1B working for cmpy X.
My H1B is picked from cmpy Y.

Current L1B is expiring 31st Aug,2022,
Considering H1B is approved with COS, can i legally stay in US after my L1B expires till 1st Oct, 2022?