it is only illegal if you are the primary applicant and you don't maintain the job at your GC sponsor. Therefore you spouse can work on EAD while you cannot. I am not 100% sure about my answer though