Read that verse again. It says that it's the father's will that not any be lost. It's also his will that all be saved, but we know that his will can be thwarted by man's will.
Now this is the will of the one who sent me: that everyone whom he has given me, I would not lose any of them, but...