I didn't think X worked this way, though, so perhaps it is some
libinput setting.

Or are you using XWayland, which may behave differently than standard
X?

I'm using both X (manually selected) and XWayland on two different machines (both with GNOME Shell). Fedora 32 and 33 respectively if that matters.