You may extend or renew your H1B as long as you haven't used your EAD (not AP). Once you used EAD, you explicitly switched to AOS and terminated non-immigrant status.
You may change your job anytime, because NIW is not employer dependent & you may apply for a new H1B.