A Griffith University study published in BMJ Public Health on Wednesday found a levy applied to non-alcoholic drinks with added sugar, such as soft drinks and most juices, could prevent 3.7 million cases of tooth decay, 191,000 cases of gum disease, and 115,000 cases of complete tooth loss across Australia over the next 25 years.



You seem to be assuming a binary choice in consumption, but the modelling in the study was that those numbers for dental outcomes would be produced by a 24% reduction in consumption of sugar sweetened beverages.
From the SBS article:
So there would still be tax revenue from the remaining 76% of consumption. But it’s a public health measure, just via a tax, so if it produced no revenue that would (from a public health perspective) be considered a huge success. It makes sense that the amount of revenue you raise and can spend on dental health would scale in proportion to the amount of consumption and dental harm. It’s a way of partially de-externalising the health externalities of the sugar-sweetened beverage industry.
It’s of limited imparting also note that (1 + 0.2) x (1 - 0.24) = 0.912. So with a 20% tax, modelled to reduce consumption by 24%, on average people will be spending 9% less on sugar-sweetend drinks.
As pointed out by @observes_depths@aussie.zone, if the revenue is directly tied to funding dental care for poorer citizens, care which someone who maintains 100% of their consumption is more likely to need, then they may end up less poor than otherwise. Not only is their tax contribution going into that funding, but revenue from wealthier consumers and those who have reduced their consumption and are less likely to need dental care.
I’ve also seen proposals where the money is spent on subsidising fresh food, so that the average weekly shop comes out to the same dollar figure even if behaviour doesn’t change, while people are doubly incentivised to make healthier choices.
The SBS article also mentions that the tax can be designed to encourage reformulation of drinks, with drinks below a certain sugar concentration exempted from the tax, as happened in the UK:
So in the UK 90% of drinks are no more expensive to the consumer, but tax-incentivised reformulation has meant sugar consumption from sweetened beverages has decreased by nearly half! (Again, revenue raising is not the aim, the tax is just a policy ‘stick’.)
The study the SBS article is about also modelled for a similar level of reformulation:
A 300% greater health impact over the ‘base case’ (20% tax, 100% passed-on), and it’s hip-pocket neutral 90% of the time!
Your arguments can equally be applied to the tax on tobacco, but we know that applying a tax (to a point, it seems!) reduces tobacco consumption and the associated health harms, and provides revenue that makes up for the cost of tobacco-related disease to our health system.
A sugary beverages tax like the ‘base case’ (20% tax, 100% passed-on) would be similar to the tobacco tax and could be used to similar effects, but, as I hope I’ve made clear above, there’s lots of options.