Do you have other status such as F, H. Otherwise it is risky. According to USCIS, if you leave before AP is approved, your 485 application is abandoned if your only status is AOS.