Same here, thought my laptop had a hardware issue. Switched the mouse, disabled the touchpad.. same issue. Everything’s fine outside of Minecraft.
Notice it most when I right-click in the game and realize the cursor has moved, because the game pauses and the context menu for the title bar or windows taskbar opens. Have to alt-tab away from the game, move the cursor back to the middle of the screen, and then switch back to the game again.
This started happening for me very recently too. Never had an issue before, but now nearly every time I restart the game, the settings all reset. I have to set mouse and keyboard bindings again, turn off the tutorial hints, change FOV.. everything I like to customize frequently gets reset.