Following a new rule, tech companies such as Amazon and Microsoft have warned employees on a H-1B visa to stay in the US.