I have a 2 years old toddler and older dog Miko.
From some time toddler is pinching/sliming the dog. Miko is human friendly - don't bite, don't growl but just squeak. We told to son than he can't do it because it hurts Miko many times. We tried to explain that it's living creature like we and he feels pain, he is sad etc. but it didn't help. Now when toddler pinch Miko one of us just take him to his room and we sit with him for like 5 mins but we don't play with him, just try to ignore and after around 5mins I ask him if he will go to dog to apologise Miko and stroke him. He answer yes and he does, then play cool for next several hours and then it happens again.
What is correct reaction for such behaviour? How should parent react?
I should add that when toddler pinch the dog then he immediately realise what he did and when we just take him to his room he start crying which means for me that he totally understand what's going on and that we are not happy.
Edited to Add: See the OP's answer for an update on what worked for them.