Stop mouse pointer from sticking to the edge of display in dual monitor setup
There is no snap-to-monitor-edge feature or anything similar built-in into macOS Mojave (or any earlier release of macOS). You are using an external monitor with extended display mode. As described, your setup is something like this:



The display on the left is your built-in display, while the one on your right is the external, extended display.

Now, notice the horizontal alignment of the displays. When moving the mouse from external to built-in display, if you are moving the mouse along the bottom edge, the pointer will have no path to move into the built-in display shown on left, as it hits the edge of the external display.



If you move the mouse pointer vertically to appropriate height, the mouse pointer will find a way to move into built-in display as soon as it reaches the corner of the built-in display. You can try this by dragging the mouse pointer along the edge of external display vertically, while attempting to move the mouse pointer towards left.

If you find this behaviour interfering with your workflow, you can easily adjust the relative placement of the displays by dragging them. There are a number of variations you can try as long as the two rectangles are not totally isolated (as separate islands). Even an alignment where just the angles of the two displays is touching is possible too :)

Refer to the Apple Support document, Use external monitors with your Mac for more details.