A little late to the party but here is the anwer:
It is a bug in Matlab. I had it happen to me in 2021a. Issue was reported to Mathworks and they were able to reproduce it.
The bug occurs when you have any control in uifigure that has a negative y position.
Workaround: make sure all your controls are inside the UIFigure completely.