This is the point. Did you use your EAD?
If not, you are safe, still H4 if you spouse didn't use EAD either.
If you used your EAD but your spouse (H1) didn't, the safest way is leaving US ASAP, better within 10days but no more than 30day. Meanwhile, your spouse may fill H4 petition for you. Once get H4 approval, you can get a H4 visa in US embassy or consulate in your home country or a third country. If both of you used EAD, the only way left is appeal.