Large financial firms use tools like Citrix to provide a desktop environment remotely. They configure Citrix to prevent copy/paste across the gap between client and server.
This enables workers to "see" their work, but not export it. Similarly, they block outgoing web requests, etc.
The reality is that you probably cannot do this - it is a stupefyingly difficult and cumbersome task, and requires pretty much a dedicated department.
If you're just trying to protect code that you wrote from being copied, your best bet is probably to break out your workers into silos, and break your code across multiple repositories: client, server, database, etc.
You can then unite the code during the build process, but restrict individual users to only accessing one or two repos.