From the employer side, the timing matters less than the surprise. As a small business owner, the worst version for me is finding out after the fact, especially if someone has been working from another country without telling us, because there can be tax and insurance consequences for the company. If someone comes to me early with a plan, I'll almost always try to make it work. So I'd tell your colleague: tell them early, and bring a proposal, not just the news.
When we moved to France, I was working remotely for a company in Seoul, and I agonised for weeks about when to tell them I'd be living in a different country. In the end I told them early, and they were fine, but a friend in a similar situation told hers late and it went badly.
Now a colleague is planning her own move and asked me for advice, and I realised I don't really know what the right timing is. When did you tell your employer you were leaving, or that you'd be working from another country? And did anything about how you told them make a difference?