Some attempts may automatically fail when reusing the same strategy, and some tasks are impossible to achieve anyway.
This is discussed in the Dungeon Master's Guide on pages 237:
Sometimes a character fails an ability check and wants to try again. In some cases, a character is free to do so; the only real cost is the time it takes. With enough attempts and enough time, a character should eventually succeed at the task. ... However, no amount of repeating the check allows a character to turn an impossible task into a successful one, [and] in other cases, failing an ability check makes it impossible to make the same check to do the same thing again.
There are certainly tasks which can be attempted over and over again for an improved chance of success, but there are those which cannot. Many players (and some DM's) do not realize that ability checks are only called for when a character attempts something that could succeed with some chance of failure. If something is guaranteed to succeed or is impossible, no check is called for: the result is a foregone conclusion without making any sort of roll.
So, use your judgment as the DM to determine if subsequent attempts at the same task would be helpful at all. In your example, it sounds like the barkeep has already made up their mind: it's too much trouble to get involved. Subsequent attempts at Persuasion are not likely to be effective, because it might be literally impossible to persuade them.
A very similar example scenario is covered right after the above passage.
For example, a rogue might try to trick a town guard into thinking the adventurers are undercover agents of the king. If the rogue loses a contest of Charisma (Deception) against the guard's Wisdom (Insight), the same lie told again won't work. The characters can come up with a different way to get past the guard or try the check again against another guard at a different gate. But you might decide that the initial failure makes those checks more difficult to pull off.
If a character attempts Persuasion with the line "help us?" or "we'll pay you" and is turned down, another character attempting Persuasion immediately after that with "come on! help us!" or "but we'll pay you!" isn't going to be effective. They could come up with a dramatically more motivating line or switch to a different strategy such as Deception or Intimidation, but the previous strategy will not be effective without changes.
My advice, based on experience.
Make sure your players realize that ability checks are not magic, and they cannot make an impossible task possible. There are no automatic successes on ability checks. That is, a high roll is not guaranteed to produce a positive outcome if the difficulty class is very high, and there is no significance to a natural 20 for ability checks. In short, a conga line of ability checks does not mean someone will eventually succeed if a task is simply impossible to achieve.
If players do not internalize this after being told and try to make ability checks anyway, especially if they are belligerent and just say "I'm rolling Persuasion!" and pick up a d20 and roll it without any indication from you calling for a check, you can simply refuse to acknowledge or assess the roll and explain that the roll was not called for because the task was impossible. In my experience with this situation at a table, this only needs to happen once or twice before your players will learn proper etiquette and understand how ability checks are meant to work.
Finally, if your players are attempting the same checks over and over again, it may be because they do not see any other viable strategy. This can be due to inexperience on the player's part, but it can also occur if the DM has not given enough hints as to possibly viable strategies. Consider explicitly telling your players what other strategies they could try until they build up more personal experience, and once you believe they have the experience to come up with strategies on their own then consider peppering your narrative with additional hints about what those strategies might be. In addition, make sure you as the DM are willing to accommodate unexpected strategies you did not think of but which the players were reasonable to consider.