There is a difference between rebuking and mocking. Paul did not verbally attack Peter in a childish way and call him names or poke fun at him, though.
Christians are not supposed to mock others. For It is written...
Matthew 15:11 ESV
"It is not what goes into the mouth that defiles a person, but what comes out of the mouth; this defiles a person.”
Ephesians 5:4
"Neither filthiness, nor foolish talking, nor jesting, which are not convenient: but rather giving of thanks."
Proverbs 26:18-19 NIV
18 "Like a maniac shooting flaming arrows of death
19 is one who deceives their neighbor and says,
"I was only joking!""
Colossians 4:6
"Let your speech be alway with grace, seasoned with salt, that ye may know how ye ought to answer every man."
Ephesians 4:29 ESV
"Let no corrupting talk come out of your mouths, but only such as is good for building up, as fits the occasion, that it may give grace to those who hear."
Proverbs 18:20-21
20 "A man's belly shall be satisfied with the fruit of his mouth; and with the increase of his lips shall he be filled.
21 Death and life are in the power of the tongue: and they that love it shall eat the fruit thereof."
James 1:26
"If any man among you seem to be religious, and bridleth not his tongue, but deceiveth his own heart, this man's religion is vain."
Titus 2:7-8 ESV
"Show yourself in all respects to be a model of good works, and in your teaching show integrity, dignity, and sound speech that cannot be condemned, so that an opponent may be put to shame, having nothing evil to say about us."
Matthew 12:36
"But I say unto you, That every idle word that men shall speak, they shall give account thereof in the day of judgment."
Christians are not supposed to mock others. For It is written...
Matthew 15:11 ESV
"It is not what goes into the mouth that defiles a person, but what comes out of the mouth; this defiles a person.”
"Neither filthiness, nor foolish talking, nor jesting, which are not convenient: but rather giving of thanks."
18 "Like a maniac shooting flaming arrows of death
19 is one who deceives their neighbor and says,
"I was only joking!""
"Let your speech be alway with grace, seasoned with salt, that ye may know how ye ought to answer every man."
"Let no corrupting talk come out of your mouths, but only such as is good for building up, as fits the occasion, that it may give grace to those who hear."
20 "A man's belly shall be satisfied with the fruit of his mouth; and with the increase of his lips shall he be filled.
21 Death and life are in the power of the tongue: and they that love it shall eat the fruit thereof."
"If any man among you seem to be religious, and bridleth not his tongue, but deceiveth his own heart, this man's religion is vain."
"Show yourself in all respects to be a model of good works, and in your teaching show integrity, dignity, and sound speech that cannot be condemned, so that an opponent may be put to shame, having nothing evil to say about us."
"But I say unto you, That every idle word that men shall speak, they shall give account thereof in the day of judgment."
Lashon Ha-Ra
Leviticus 19:16
You shall not go about as a slanderer among your people, and you are not to act against the life of your neighbor; I am the Lord.
Leviticus 25:17 says, "You shall not wrong one another." This has traditionally been interpreted as wronging a person with speech. It includes any statement that will embarrass, insult or deceive a person, or cause a person emotional pain or distress.
Read what Jesus said speaking to the multitude and his disciples.
Matthew 5:22 (New American Standard Bible)
22"But I say to you that everyone who is angry with his brother shall be guilty before the court; and whoever says to his brother, 'You good-for-nothing,' shall be guilty before the supreme court; and whoever says, 'You fool,' shall be guilty enough to go into the fiery hell.
Notice how Jesus condemns those who are angry with their brother.
Notice how Jesus particularly condemns those who call people "fool."
Now let's look at how Jesus behaved in Matthew chapter 23.
Jesus became angry with the Scribes and Pharisees calling them hypocrites seven times. Technically all men of Israel were his brothers. [Deut 3:18] He was angry with his brothers.
"" You fools and blind men! "" Matthew 23:17
""Woe to you, scribes and Pharisees, hypocrites! For you are like whitewashed tombs which on the outside appear beautiful, but inside they are full of dead men's bones and all uncleanness. "" Matthew 23:27 IMO a major insult.
"""You serpents, you brood of vipers "" Matthew 23:33 Now Jesus is really getting angry and laying on the insults.
You be the judge.
Did Jesus follow his own advice ?