My sheep stolen despite them being closer to me

My first scout died with sheep, then I sent my second scout to take the idle sheep that were in my control. But then the enemy scout steals them from me, despite being closer to my scout, as seen in the pictures. In the picture when they become red, it is one frame afterwards in the replay.

map seed: 6c8bd066
game version: 5.0.24916.0

Thank you for reporting @AirManatee57627! The team will investigate.