The shadows mentioned are a result of comparison between different plots ("randn" randomizes the plots created) and a lack of clarity observed when using the "plot" method for plotting directly from MATLAB command line. This lack of clarity stems from the different graphic rendering libraries used to render graphics ("plot" function utilizes the OpenGL library while the "UIFigure" component utilizes the WebGL library for graphic rendering).
On macOS, increased clarity is noted with "UIFigure" because OpenGL has been deprecated since macOS 10.14. This deprecation causes plots and other figures rendered with OpenGL to lose clarity on macOS machines: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_threading/opengl_threading.html
The unexpected performance issues with your mouse could be caused by a high DPI display. When the pixel scale is increased due to the use of a high DPI display setting, it might cause MATLAB to utilize different line rendering pipelines, making the UI unusable as the "LineWidth" increases due to scaling.
As a workaround, you can try to scale down your display when rendering this plot using the app by changing your display resolution. For more help regarding scaling display settings on macOS 14, you can refer to this documentation:https://support.apple.com/en-us/guide/mac-help/mchl86d72b76/14.0/mac/14.0