That’s just how the game works. I agree that it’s annoying but there’s nothing you can do to stop it. That’s the reason I dislike Tom Nook, Timmy, and Tommy. They always get in my way when I’m trying to browse.
I play "tag" with Mabel in the clothing shop to keep her away from the fitting room. I don't need her hovering outside that while I'm trying clothes on.