He stayed in the garage for too long. He was delighted with his awesome hiding place; there are a couple moments when he almost decided to bolt and take his chances, but then he heard kids screaming as they were found in succession, so he decided "to hold out a bit longer." He then started daydreaming about how great it was going to be when he emerged victorious, the last one not found. He though about "what fun if they were all found and caught—he alone left unconquered! He had never known that sensation...that would be thrilling beyond imagination." This daydream lead him onto others; time passed, and he still wondered if he heard the kids playing and screaming, and thought he did. But then, with a cold start, he realized that he had forgotten that he needed to touch home base to win. So, "with a whimper he burst through the crack... he flung himself at the white pillar and bawled, 'Den! Den! Den!'" but he was much too late. The kids had stopped playing a very long time ago, and had forgotten him. And then, the tragic end: "The ignominy of being forgotten—how could he face it? He felt his heart go heavy and ache inside him unbearably. He lay down full length on the damp grass, crushing his face into it, no longer crying, silenced by a terrible sense of his insignificance."
So Ravi loses because he stayed too long in his spot, and the other kids moved on, forgetting him, not even acknowledging his feat.