Basically, think it this way. There is no such a thing as "AOS Pending Status", you are under your current immigration status until your case was approved. AOS Pending Status is kind of like deferral from removal process. If your status was expired during the AOS application, then ICE will not remove you because your new immigration status is under process. But if your new immigration status is not approved and you have no status then you might have to appear in court. The disappointing part is diversity visas cannot be carried to next fiscal year. So let`s say someone`s EB GC application is under process and no visas are available and their status was expired, then there will be new visas available to them next fiscal year. Also for the EAD, if you have a work visa like O-1 or H1-B it will not cause you to lose status because you are already allowed to work in the US, but if you are F1 and you used your EAD for off-campus or non-CPT or non-OPT jobs, then you violated your status.
For this reason, if you find another opportunity such as bona-fide marriage or employment sponsorship, then make sure that you maintain your status until adjudication or try everything not to get fired from your employer or get divorced from your partner during the AOS process.