The PS4 Dualshock controller should work without any additional driver installation - the ds4drv is an old and un-maintained driver and it shouldn't be used.
If you configured your controller in EmulationStation, you don't need to do any configuration in RetroArch. The configuration for RetroArch is automatically generated from EmulationStation - see https://retropie.org.uk/docs/Controller-Configuration/. You can check if your auto-configuration for RetroArch has been generated by looking into the \\retropie\configs\all\retroarch-joypads folder (over file shares). Do you have a .cfg file for your controller there ?
Aside, you should be using a proper power source for your Pi, a mobile phone charger is not enough for most cases, especially on a 3b+. Do you get the low voltage sign when you start a game ?