Based on the facts as presented, your wife's adjustment application is based on yours first being approved and then hers being approved as your accompanying relative. For this reason, in the case of a finalized divorce especially, she would not have a legal basis to continue qualify as your accompanying relative on a pending status adjustment application. However, if the divorce is not finalized before approval (more or less if you have just separated), there can be some grey area primarily tied to the awareness of USCIS of your marital situation .
The above being said, it is important to note a foreign citizen has a responsibility to affirmateively prove he/she qualifies for status adjustment. Also sas a general rule a foreign citizen is expected to disclose information to the USCIS that if not disclosed could be construed as misleading.
She only has her status due to being a derivative dependent of your principal application. Therefore, if you were to get divorced from her prior to her green card application approval and yours of course, then she would loose her H-4 and prospective I-485. If USCIS doesn't find out about it and approves the I-485 anyway the issue may surface again in the future when she applies for naturalization and her green card may be rescinded if its been 5 years (statute of limitations to rescind a green card unless USCIS can prove fraud than there is no statute of limitations(.