There is no law about this. This is based on popular intrepretations. Some of the significant facts are like these
1. After 485 the dependent's GC application is on its own track (except for the fact that approval is tied to the continuance of the relationship with the primary applicant)
2. When I485 is pending, the primary applicant can use both H or EAD for work authorization. Yes, you can switch back and forth -provided both are valid all the time. H1 or EAD provide employment authorization only. The status comes from the pending 485 . Of course in a the old INS FAQ on AP clearly stated that if your H visas are valid, then you dont need AP. I am unable to find the link now.
3. When the dependent uses EAD, the H4 is superceded (not invalidated). This means that, the dependent can work on EAD for sometime and then go back to H4 after some time- provided it is done properly (go out of US, use H4 stamp to come into US, new I94).
4. Dependent's status is determined by the I485 pending and/or primary's status.
5. Primary applicant's status is not governed by what dependent's status or employment authorization is..
Once again scour the various texts on the BCIS site on this matter. Apparently AP is becoming a substitute for passport in many cases, Employment based I485 applicants using AP are very finite minority among all AP users...