Sound like there is a 2 output USB charger of the plug type, which Viofo might supply these days, i have not been privy to sampling their products lately.
But then Viofo should also supply a cable i am sure, but OP could have used another longer cable maybe ? and this can indeed be a problem especially if it is a cheap CCA cable.
Erratic behaviour like this is indeed often to blame on a insufficient power supply
Mind you there have also been cases of faltering power supplies and of course also the cameras them self, but these are a lot more rare then creative power sources people will deploy / reuse from a older system.
I suppose it could also be a issue with how the power source is seated in the dash 12 V socket, at least there have been cases like that though old now, try to gently wiggle the USB plug in the socket the next time the camera go out.
Maybe also gently Wiggle the plug that go into the camera to see if its maybe not proberly seated or in other ways have a flaky connection.