In 2018, the British government introduced a tax on soft drinks with a sugar content of more than 50g per litre. The tax isn't particularly onerous, at 18p or 24p (22¢ or 29¢) per litre depending on the sugar content. The industry response was immediate - the majority of drinks were reformulated to reduce their sugar content to below the threshold, which is precisely what the government intended. Although initially controversial, the levy is now regarded as a clear victory for public health, with no significant economic impact on industry.
Even if the purchasing habits of consumers are price-inelastic, the decisions of manufacturers most certainly aren't.
https://www.instituteforgovernment.org.uk/explainer/sugar-ta...