So Pokemon Ultra Sun/Moon has a weird glitch due to a coding error. If you talk to the Ditto disguised as a Chef from a little left (directly on the center but a little left, or just in front of the blue pan), and then catch/defeat it (I recommend to catch it bcoz good IVs.), the real chef will run towards you and then get stuck in the running animation, making your character uncontrollable and the menu inaccessible.
Now, don’t worry. This does not lock your game infinitely. It will become normal after half a minute. But it could be quite annoying, or if anyone doesn’t know it, will become scared of losing his progress or just rage reset.
So, if you somehow trigger this glitch, you had to wait 30 secs to get it normal. If you don’t want this glitch to happen, don’t stand at that particular position.