This bug only applies to custom commands created client-side by developers. The built-in default commands do not have this issue (I guess because they were created by the server).
The following post contains an example of this problem:
I am in exactly the same situation - I want to add developer-only commands for debugging on the client-side etc. - but when used they will be replicated to other players, and I don’t want that, and can’t find a way to turn it off.
The flow chart in the documentation contradicts this behavior, because it suggests messages which trigger a command will be sunk. It doesn’t specify that it only applies to commands created on the server, and not commands created on the client.