H1B Transfer when H4 COS is pending

Can the company file for an H1B transfer while the H4COS is still pending?
Sequence -
1 Got laid off and filed for H4COS/539. (H1B to H4)
2. The H4COS is still pending.
3. Got a new job.
4. Can the company file for H1B while H4COS is pending?

My i140 is approved and I don’t fall under any lottery.

Yes, COS to H1B can be filed even if H4 COS is pending however you may receive RFE to provide proof of approved/valid status at the time of adjudication of H1B COS.
You can file H1B COS under premium processing and that may trigger a faster processing of the H4 COS so that USCIS can approve your H1B COS.