Most powerbanks won't support charge-through, which is not surprising given the usage scenario they've been designed for:
They are meant to charge a portable device in the absence of power sockets.
When a power socket is available, you wouldn't need the powerbank - you could charge your mobile device straight from that one.
Even for those models that support charge-through, I doubt that they are meant to be operated under continuous load. I'd expect battery lifetime to suffer if they are.
Well, a graceful shutdown is the only reliable way to avoid that, and you won't get that with a powerbank solution.
Besides, you will get quite a few sd cards for the price of either UPS purpose gadget.
If you're really keen on this, I'd research available RPi-specific UPS solutions instead. They may not even be that much more expensive than a powerbank, and some may even offer additional benefits like a graceful shutdown power button. Cheaper models like Waveshare's UPS HAT may focus purely on UPS.
I have zero experience with those myself, but I recall German ct magazine has done a feature article on UPSs some years ago. Maybe that's still available. 