Mouse flicks uncontrollably, regardless of the speed of my mouse movements, thus making the game unplayable.
Related issues
Comments

On a possibly related note. My mouse seems to be randomly jumping to different directions. I'll be playing and it will suddenly just snap to another direction. I am on Linux, Xubuntu to be specific.
Yes, that's a known Linux-specific issue, MC-144107, and the reason why I asked OP whether they're using Linux.

If you're on Windows, try going to task manager, right clicking the javaw.exe process and setting priority to 'Below Normal' this tends to fix the issue for me.
@unknown, you might also want to try adjusting your mouse settings in the Controls
menu.

Yes I am playing on linux. Ubuntu 18.04 to be exact
I assume your issue is MC-144107 then, that's a known issue with Minecraft in windowed mode on Linux.

Is there a way to resolve the issue? I have tried playing on both windowed and full screen but the issue remains
MC-144107 says that the issue doesn't happen when enabling touchscreen mode, though inventory management is more difficult with a mouse if using touchscreen mode.
Are you playing on Linux?