And, was it originally in Aramaic/Hebrew and translated into Greek? If yes, then in Aramaic, the word used is Cephas which has no such issue
And finally, the chances are better that Jesus original words WERE in Aramaic, not Greek
Jesus probably spoke in Aramaic, although most people in the Roman empire spoke koine Greek also. The point is, the gospel was written in Greek, so when Matthew had a choice of using petra or petros I believe the Holy Spirit made the choice of words.