Mouse pointer enlarges for a moment
The behaviour that you are encountering is due to an accessibility setting called Shake mouse pointer to locate.

First introduced in OS X El Capitan 10.11, it helps in locating mouse pointer for people with vision disparity. It is also widely used for easily locating the mouse pointer when using a multi-monitor setup and/or high-resolution display(s).

The setting can be enabled/disabled by going to System Preferences → Accessibility → Display.