I have never came across a state that allows "working" (in the meaning of a "doing a job") in its vicinity for tourist visa holders but I have came across many countries that don't allow it.
And yet, when someone works with a laptop for customers outside that country, I don't think it really reflects the meaning of "working" or "doing a job" in that country and therefore a place for interpretation becomes existent.
Is working from a laptop when travelling to countries with a tourist visa formally illegal all over the world?