The simple option is to plug the iPad into a wall outlet with an adapter to charge it.
The more involved way is to perform a clean install by following Sniki's UEFI hotpatching guide.
You'll want to use a newer version of Clover than the RehabMan version mentioned in that guide.
Introduction Welcome to my HP 8300 & 6300 (all form factors) macOS Mojave guide. The inspiration to get one of these Desktops came from @trs96 and his great guides that he created for macOS High Sierra & macOS Sierra. These Desktops are excellent machines that are both affordable and powerful...
www.tonymacx86.com
Important note: You can't expect success if you mix and match parts of my guide with the UEFI hotpatch guide
for this HP. You'll need to follow one or the other 100 %. So if charging via USB is important, test out Sniki's
guide with a clean SSD or HDD and keep your current one as a backup.
When I wrote this simple beginner's guide back in 2017 I didn't include the more advanced techniques of UEFI hot patching and custom SSDTs. Those give a higher level of fine tuning and refinement so that things like charging an iPad via a USB port will work.