Detaching a party member

my player is rounding up missing sheep. When he approaches one it is added to the party and then follows the player to the sheep pen. I want it to be detached from the party and left behind when the player goes in search of the next sheep but I can’t make this work. I have an event just inside the sheep pen which is set to detach the sheep, but it doesn’t work. Can anyone help please.
How did you get the sheep to attach to the party?
Sheep leaves party. Movement event, change image, move sheep into pen.
How did you get the sheep to attach to the party?
I created another actor called Sheep1 and used the attach party member event

Sheep leaves party. Movement event, change image, move sheep into pen.
I’m sorry but I don’t understand that. Is movement event part of set move route?

Original thread: https://forums.rpgmakerweb.com/threads/detaching-a-party-member.103098/