Canada for example says right on their immigration website that if you are working for a company not based in Canada and are paid from outside of Canada then there is no problem.
Thailand, and most of South East Asia frankly, have laws on the books that say any work, including volunteer work, is work and is forbidden. Thailand has however stated some years ago that 'Digital Nomads' aren't their concern, just illegal workers. There have been arrests in shared work spaces but people were released after. Definitely a grey area.
Singapore's another example but you can count on them to enforce the law to the letter.
That's an uncomfortable truth you don't see people talking about on the remote job boards.
You don't read about many issues because nobody is going to know that a guy on his laptop is working and not uploading holiday snaps to Facebook. I'd personally avoid coding camps, shared workspaces and collaborating in person if I was going to skirt the law and do it anyway.