وَإِن يُكَذِّبُوكَ فَقَدْ كُذِّبَتْ رُسُلٌ مِّن قَبْلِكَ وَإِلَى ٱللَّهِ تُرْجَعُ ٱلْأُمُورُ
"If they call you a liar, messengers before you were called liars too. All matters are returned to God."
The sentence is built as a consolation, and the consolation is given not by removing the denial but by setting it into a sequence.
And the verb is passive: kudhdhibat — "they were called liars". Those who did the denying are not named; what is mentioned is the event itself.
The same line was treated in al-Aḥqāf at 46/9: mā kuntu bidʿan mina'r-rusul — "I am not an unprecedented one." There the one speaking was the Prophet; here it is the text itself that speaks. The two verses say the same thing from two mouths.
The same sentence will come once more, in almost the same words, in the twenty-fifth verse of this sūra (wa in yukadhdhibūka fa-qad kadhdhaba'lladhīna min qablihim). It is a repetition that can be verified within the sūra.