This has been an issue for some time.
The reason it happens is that the world hop menu is not open. I just wrote this fix in my scripts since it wasn't fixed in the API
I fixed this by first doing
openWorldHopTab();
hopWorlds()
Most scripts won't have this issue unless you are opening another tab while doing something.
If you are just buying items from a store, you won't notice it.
But if you are clicking in item in your inventory after hopping then the menu won't be opened thus causing the issue.