It is true that the supposed "Gospel of Barnabas" mentions Allah and Muhammad. The problem with this fact is that the nearly universal conclusion of scholars who have looked at this document is that it was written about 1500 years after Jesus lived and nearly 1000 years after Muhammad lived. There is zero chance that this supposed gospel was written by Barnabas or anyone else who lived in the first century AD. The signs of a late date are numerous and devastatingly convincing. First of all, there is literally no evidence of the existence of this "gospel" before the late sixteenth century. The oldest known manuscript was found in 1713. The manuscript is in Italian, not Greek or even Latin. It has evidence of having been translated from Turkish into Italian or at least influenced by Turks. No serious scholar has yet dated the original earlier than the 14th century. So much for this supposed evidence for a Muslim-friendly gospel!!!
It is true that one manuscript in the seventh century mentions a pseudepigraphal "Gospel of Barnabas." However, no serious scholar believes this supposed gospel is from the first century. It is considered apocryphal by those who mention it. Besides, there is no evidence that the Italian and Spanish versions of the "Gospel of Barnabas" found in the seventeenth centuries is a translation of the document mentioned over a thousand years earlier. Most likely it is not, for several reasons I will mention below. No one quoted from the earlier document or even mentions its existence before the seventh century, and remember that it is extremely unlikely that the document referred to in your question is the one referenced in the seventh century.
There is good evidence that the document you say is evidence of a pro-Muslim gospel was composed by a Muslim or a Muslim sympathizer, probably in Italy, probably in the sixteenth century or thereabouts. This is not the only fake "gospel" produced by Muslims during the late Middle Ages and the Renaissance. Others have been studied as well. All Christian scholars and nearly all serious Islamic scholars (such as Abbas el-Akkad) consider the book to be apocryphal. The book seems to quote from Dante or at the very least to imitate his style in the Inferno. There are some rather blatant anachronisms in this book. For example, it has extensive material on ascetic living, even going so far as to call Old Testament prophets such as Obadiah ascetics. This supposed gospel has Jesus as prophet rather than Messiah. This is a rather blatant Muslim take on the Christian gospels. It actually mentions Muhammad. Now, which is more likely, that a 16th century forgery put Mohammad into this document or that Mohammed was mentioned by name in the first century by Jesus? The fact that Muslims use this as evidence shows desperation on their part rather than evidence for a Muslim-friendly version of Christianity in the first century. In the so-called Gospel of Barnabas Paul is called "the deceived." Is there any chance that a Christian document would label one of the apostles as deceived? This
"gospel" denies that Jesus was crucified when non-Christian historians from the first century agree with the gospels that he was crucified. This is rather blatantly a Muslim-influenced change in the gospel stories. The document has a long section arguing against predestination when this teaching did not enter Christianity until at least the fourth century. This 17th century document has Jesus rejecting the idea of trinity and denying that he is God. (And having said this, Jesus smote his face with both his hands, and then smote the ground with his head. And having raised his head, he said: "Cursed be every one who shall insert into my sayings that I am the son of God" (53:6)) It is blatantly obvious that this is an attempt by its author, writing one thousand years after Muhammad lived, to find a compromise between Christianity and Islam. The fact is that this teaching is contradicted by all for of the canonical Christian gospels. Other obvious historical errors in this "Gospel of Barnabas" includes the claim that Jesus sailed across the Sea of Galilee to Nazareth (Ch 20-12) when this city is not near the lake. It has Jesus born during the rule of Pontius Pilate!!! The writer of this book seems to not realize that Christ and Messiah are the same word in Hebrew, an error that the real Barnabus certainly would not make. It calls Jesus "Jesus Christ" (ie Jesus Messiah) yet has him saying he is not the Messiah (ch 42). It has a jubilee being held every 100 years, when any Jew, including Barnabus, would know that these come every fifty years. It has Adam and Eve eating an apple, a common mistake in the late Middle Ages, but not one a Jew in the first century would make. It has wine stored in wooden casks–a common practice in later Western Europe, but unknown in the Middle East in the first century. The Old Testament quotes in this manuscript come from the Latin Vulgate, which was not produced until about AD 400. The examples can continue for a very long time. Bottom line, there is no chance whatsoever that this book was produced any time before AD 1000, and there is no evidence here whatsoever for Jesus mentioning Muhammad.
Any Muslim who has been so unwise so as to use this "Gospel of Barnabus" as evidence in support of Islam would be well advised to stop using this rather blatant forgery as it will make Islam, or at least the apologist using this bogus evidence, to look very foolish. My request is that you be intellectually honest enough to no longer push this forgery as evidence of a different gospel.