This allegation is brought up by non Ahmadi Muslims many times and its sad that they do not even read the entire prophecy nor understand it.
The prophecy sent to Ahmad(As) by Allah was :
Translation: (1) [Arabic] Allah has decreed since eternity that He and His Messengers shall prevail. (2) [Arabic] God, the Merciful, says that there is peace, meaning that ‘you will not
die in disappointment or defeat.’ (3) [Urdu] I shall die in Mecca or in Medina.
Explanation from the Messiah(as) himself:
This sentence ‘I shall die in Mecca or in Medina’ means that before my death I shall be bestowed a victory like that of Mecca. That is to say as the Holy Prophet(sa) had vanquished his enemies through the manifestation of the majestic Signs of Allah, so will it happen now. The second meaning is that before my death, I shall be bestowed a victory like that of Medina which means that people’s hearts will of their own be inclined towards me. The phrase: [Allah has decreed, I and My Messengers shall prevail]points to a victory like that of Mecca and the phrase: [Peace is the word from the Merciful Lord] points to a victory like that of Medina.
This prophecy was beautifully fulfilled. When one looks at the success of the jamaat itself it becomes evident.
Here is a picture of what Ahmad(as)said and his explanation as i’ve written above:
Why don’t they read the entire prophecy in context and read what Ahmad(as) wrote? The truth is indeed clear that the lies of Anti Ahmadis will never prevail, rather Allah’s prophet will prevail as he has for the past 125 years.