Are you sure this is the case? You’re not allowed to get hired locally but I believe you can work online for a company based in your country of residence provided you don’t stay long enough to become a resident of the new country (which you can’t on a tourist visa). I visited Canada for 6 months on a tourist visa. I had a full immigration interview at the airport when I arrived and they were perfectly happy with me working freelance/online for those 6 months. They were just clear I couldn’t become an employee of a Canadian company.