I have this behavior on desktop specifically on the laptop trackpad's 2finger swipe gesture, which seems to be used for both scrolling as well as back/forward. I do not have this behavior on other input devices' methods for scrolling (e.g. mouse wheel horizontal scroll).
You can disable the touchpad gestures via about:config: https://www.instructables.com/Customizing-multitouch-gestures-in-Firefox/