I'd really would encourage you (and other fellow software contractors) to not think in terms of amount of code produced but in terms of solutions brought to the client that helped solving a specific business problem. As I've responded to another comment, there is no correlation between the amount of ASCII chars produced and productivity/net gain for the client.
As for UpWork it doesn't make it any better (for me) if their payment protection is bound to this kind of screenshot surveillance. If they don't offer a payment protection in every* case, I wonder why they exist in the first place other than talking a good cut from your daily rate and making everything more complicated for both the software contractor and the client.