Once your I-94 expires and you have not applied for AOS, you will start accumulating overstay. Your overstay stops accumulating once you apply for AOS. If your overstay is over 6 months you will banned from returning to the USA for 3 years. If your overstay is over 1 year then you will be banned from returning to US for 10 years. So, if you have accumulated over 6 moths or more, do not leave the USA until you get the GC.
So, you must file for AOS before your I-94 expires so that you will not accumulate any overstay (no gap between AOS and expiration of the I-94).