I saw stories of laid-off Americans told to train their foreign replacements
Should not be legal
More than just stories. It's often a condition to receive severance pay.