Higuma didn't do the same ... this is what happens when you rely on meme's and jokes reading comprehension is piss poor.
Shanks cares about how he's viewed especially to his crew who he protects Mihawk calling him a "has been" and too weak isn't something anyone can get away with, as I said it a shoot on site when you insult Shanks to the level Mihawk did.
Why didn't Shanks let Bartolomeo go ?
Shanks doesn't care about being insulted, he established this at the start of the series.
This is why when Luffy was made fun of by Bellamy, he thought back to Shanks being humiliated by Higuma.
It's one thing to insult him, he's fine with it... it's another thing to hurt his friends, that's the 1 of the only times he's okay to get violent.
Shanks let Barto leave, but he got corrected by Yassopp the way Luffy got corrected by Zoro when he tried to get Usopp return back to the crew without apologising first.
People don't know Shanks and Luffy are friends, they don't know their relationship. As an Emperor, the moment you look soft, you put the people you protect in danger.
An Emperor can't afford to look weak under any circumstance, if your goal is to protect your friends, looking weak endangers your friends. Majority of Shanks' protected are seemingly weaklings, so more reasons for Yassopp to take out Barto.
It's the consequences of their actions, he made the right choice.
End of the day, those actions that Yassopp made on behalf of Shanks were right, it was to protect his friends which is his priority - the safety of his friends is more important than anything personal.
Luffy also being an Emperor is responsible for the subordinates of his alliance whether he likes it or not. He's now an Emperor as well.