I confirm Anna's analysis of the H-1B exception (Matter of L-K-, AC21 §106(c)). Two pitfalls that catch people at the border:
1) If you have an already-approved I-140 from your old employer, great. If the I-140 is still pending, or you changed employers less than 180 days ago, there's added risk because AC21 portability hasn't fully kicked in.
2) Don't stay abroad longer than necessary. If your new H-1B stamp expires before the next I-485 RFE, you want to be inside the US. Also: at the border, don't volunteer that you have a pending I-485 unless CBP asks directly. That's not hiding — just not adding unnecessary detail.
Belt-and-suspenders: file I-131 for AP in parallel — it's free (already included in the I-485 fee), and in 5-7 months you'll have an independent travel document.