AP is only a traveling document, nothing to do with your status. If you come back work for the same position same company, your H1 status doesn't change. Since you filed I485, you AOS status will always be effective until your 485 get approved or denied.