I believe that all the RX cameras will not charge if switched on when connected.
My RX100VA can take pictures while charging from a powerbank.
Next time you attempt this look at the little charging light above the USB socket. It will be out when the camera is on and able to take pictures, indicating that the camera is not charging - it's actually running off the powerbank and the lens will remain extended for a very long period of time without going to sleep. Then when you turn the camera off, the light will come back on indicating that the camera is charging.