To play Kantian for a moment, the mental abilities of understanding and reasoning are different things. Dogs have some limited understanding but no rasoning in my opinion. No it's not just body language and tone. The commands sit stay down etc are delivered in the same tone by most handlers, and without gestures. Clearly the dog can tell what the word means. A dog trained in English will not respond to French commands or vice versa. Dogs that can fetch different beverages from a cooler on demand are not extremely rare. They can obviously then not only understand but perceive and remember the difference between water and soda.
Now yes of course a compound sentence of invective delivered in a pleasant voice will be wagged at and glowing praise delivered in a stern tone will be treated with deference in a trained dog. Complex conversation is beyond them IMO, and tone obviously conveys much. Certainly they lack reasoning. But to posit they cannot distinguish between words - understanding - is to deny common repeatable experience.