In the most recent release, when inverted scroll is enabled in Window’s settings, Minecraft will ignore it, at least when scrolling the hot bar. In previous versions this was not a problem. I personally do not use inverted scroll but know people who do and it is very problematic.
There are a few related issued reported in 26.3 MC-311906 and https://report.bugs.mojang.com/servicedesk/customer/portal/2/MC-311933 which are probably caused by a similar change.