Play it to the 2-card ending with East on play.
At this point West is known to be void in ♥ and void in ♣. There is seen from Easts point 4 missing cards, 2♠, ♣9 (Must be at declarers hand) and ♦J (could be at either hand, but as human we know it is at partner, but ignore that).
Playing a small ♠ is just a no win play - I have tried to find a simulation, that could justify the play, but I failed.
Was it 2 humans I would have given some blame to West for not throwing ♦J in the 3-card ending.