Not unlawful...
But one always supercedes other. i.e. you cannot be on both, you have to decide what status you want to be on.
If you are laid off, you can always travel out of US and get a H4 based on your spouse H1 and enter into H4. And later if your H1 is still valid and employer is ready to take you back, you can once again go out of US and come back based on the stamp (along with recent documentation)