The Music Library Resets .....

I am using an RPI 3B with a Boss DAC. Two pen drives, 32gb and 64gb are inserted into the USB ports of the Pi, which contain all the music.

Whenever I change the power sours, say I change the adapter, the Music Library resets. One of the two pendrives doesn’t show at all, and the other one shows only few folders. Then, I have to go to the My Music option and Re-Scan. Then the library gets recreated.

Nowadays, I am using a mobile battery bank as the power source. Often, not everytime, when I connect the bank, the above thing happens. It’s frustrating. Can you please examine why this happens and what to do about it?