I have had docker pihole running well, and one of the changes I made at some point was to access the web-gui when connected to my vpn on 10.x.x.x/24. I don't remember how I set this up.
Just adjust Pi-hole's Interface settings at Settings | DNS:
Switch to Respond only on interface xxxx.
To the same effect, you can set Pi-hole's advanced Docker environment variableDNSMASQ_LISTENING to single for your Pi-hole container, in conjunction with a respective INTERFACE.
If you employed one of Docker's bridge network modes, you should use Permit all origins (all) instead.