The question above cannot be easily answered. However, most lawyers and people who researched the law including our own team believes that H4 visa holders CANNOT engage in active work while on US soil for a foreign company although the payment is made abroad. However, there are some other school of thoughts which might argue otherwise, but our understanding of the law reflects this:

As per 8 CFR 214.1(e) states that any non-immigrant who is physically present in the U.S. may not engage in any employment in the United States unless it is specifically authorized.

A non-immigrant in the United States in a class defined in section 101(a)(15)(B) of the Act as a temporary visitor for pleasure, or section 101(a)(15)(C) of the Act as an alien in transit through this country, may not engage in any employment. Any other non-immigrant in the United States may not engage in any employment unless he has been accorded a non-immigrant classification which authorizes employment or he has been granted permission to engage in employment in accordance with the provisions of this chapter. A non-immigrant who is permitted to engage in employment may engage only in such employment as has been authorized. Any unauthorized employment by a non-immigrant constitutes a failure to maintain status within the meaning of section 241(a)(1)(C)(i) of the Act.” (Emphasis added).

Since the H4 visa clearly does not allow employment, our conclusion and recommendation are that no H4 visa holders should engage in any employment in the United States.