This is the basis for taxing high sugar convenience food. It was done for cigarettes, and today, consumers overwhelmingly see it as a good program. (Of course tobacco companies lobbied hard against it)
You're referring to so called "sin taxes". I'm aware those exist for cigarettes of course, and I know some places have them for sugary drinks, but I'm not aware of any sin taxes on sweet food. I know many places that do not have sales tax food have exclusions that put candy back under regular sales tax, but those aren't sin taxes, and the sales tax percentage (usually at or under 10%) wouldn't come close to the sugar drink sin taxes I've seen (which are closer to 50%). In my state there's no sin tax on sugary anything, only the rules that mean that candy bars would have regular sales tax applied (about 7% in my area).
Can you cite a particular sin tax or situation where there is excessive taxation specifically on candy?
There seems to be no good reason for this relaxation of corruption oversight. Has Zelenskyy made any statements as to why he signed this into law?