I have a similar setup. Pihole and unbound running on a separate box, with unbound configured as a recursive resolver. In my case I have put the pihole/unbound box IP (v4 and v6) under System/Settings/General, and checked the box to disable the local DNS as a nameserver. But I don’t have unbound or any other resolver running on OPNsense anyway. I have also disabled DNS rebinding protection on OPNsense as that was preventing local name resolution from pihole (unbound itself gives me that protection for external resolution). And I have made sure I have firewall rules to allow all VLANs to reach the pihole/unbound box.That’s it, and it works.Configured this way OPNsense passes out the pihole/unbound IPs as DNS nameservers, via DHCP for IPv4 and (in my case) RA/RDNSS for IPv6, to all local clients. No need to configure anything specifically for those services as they pick up the system setting if nothing specific is configured.
... everything trying to bypass it is blocked by the firewall and redirected to Pi-Hole, including DNS-over-HTTPS
Not perfect - relies on the DNS server list being comprehensive - but better than nothing I guess