you're usually bound by the locality where the contract is signed, so you dont suddenly gain rights just by moving abroad until the employer actually creates a new contract. for that to happen, the employer would have to create a legal entity in that legal region.
do note however, that some nations dont allow you to work while on their soil, unless you specifically get a visa permitting it.
The employer will need to withhold taxes for the state of the employee as well.
This is frequently hard to detect with everyone teleworking, but rest assured that HR is getting a call if someone works in a state with maternity leave laws requiring it.
While not generally applicable for digital jobs that telework, I think the most obvious would be minimum wage. If I live in Seattle and telework to a job in Alabama that pays only $11, that’s a liability for the employer.
Of course, I think that if an employee was teleworking from a location without approval that’s likely grounds for dismissal.
Therefore I believe all nations will decide that work done on their soil must follow their employment laws, even if done for a foreign company.
There is precident for that interpretation pre-pandemic in many western countries.
"Hi HR, you need to pay be the 8 years maternity pay you owe me because I live in Svalbard and the local laws require all employers pay that".