What would be the difference between the output of a power bank and a laptop usb port?
The product page for the power bank says that it guarantees against short circuit, and over-charging for your portable battery and devices.

Opened up the user manual and the third line under Safety Instructions states once the product is fully charged, your power pack automatically shuts off to save power.

My guess is that this is messing with your desired operation. Your laptop is outputting a steady 5 V and doesn't care about overcharging, whereas the power bank is treating your encoder like a phone and so it shuts down intermittently.

I suppose a solution would be to determine what the power bank uses as a queue to shut off and circumvent that or buy a different power bank that doesn't shut down.



EDIT: I found the following on the Arduino Stack exchange: Power bank turns off spontaneously.

It agrees with my thought but also adds that a possible reason is that your load is too small. You could try putting an additional load in parallel with your encoder to trick the power bank.