If you have a boss or a client, they should care about your output, not your inputs.
Did you do what you said you would do? Did you do it well?
Not: Did you spend at least 25 hours doing it? Also not: Did you sit at a specific desk in a specific office for a specific number of hours today? Definitely not: Did it look like you were working hard?
If your boss or client wants to meddle with your inputs, politely ask them not to. If they persist, ask why it matters when or how you work, as long as you get your work done.
If they don’t agree to let you manage your inputs, then fire them. Because they don’t trust you. And that lack of trust will lead to bigger problems.