TL;DR:
Try a USB C to lightning cable.
Had the same problem. I have my iPad (4th gen iPad Air) perma-connected to a lightning-to-USB 3 camera adapter so I can stream digital music to an external DAC and from there into a headphone amp. Until the 16.5 release, the iPad would charge as long as it was plugged into the Lightning extension cable connected to the adapter with no problem. After 16.5, it would only charge when powered off.
Elsewhere in the Apple discussion forums someone recommended using a USB C to lightning cable, instead of the USB A to lightning cable that I normally use. So, I found a USB C charger (Anker - 75W maybe) and what I think is the OEM USB C to lightning cable that came with my iPhone 14 Pro, plugged it in and like magic the iPad is charging fine again through the camera adapter while powered on.