Communications error to 127.0.0.1#5335: timed out

The issue I am facing:

Getting the error:

;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out

when querying certain domains.

Details about my system:

RP5, with latest PiHole version running unbound.

What I have changed since installing Pi-hole:

Configured PiHole to use UnBound.

What's odd, is this works:

> dig +dnssec @127.0.0.1 -p 5335 microsoft.com                                                                                              9 ✘ ╱ took 15s  ╱ with tony@bogey-pi-rp5 ╱ at 20:07:40 

; <<>> DiG 9.18.24-1-Debian <<>> +dnssec @127.0.0.1 -p 5335 microsoft.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55078
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 1472
;; QUESTION SECTION:
;microsoft.com.			IN	A

;; ANSWER SECTION:
microsoft.com.		3151	IN	A	20.231.239.246
microsoft.com.		3151	IN	A	20.76.201.171
microsoft.com.		3151	IN	A	20.70.246.20
microsoft.com.		3151	IN	A	20.236.44.162
microsoft.com.		3151	IN	A	20.112.250.133

;; Query time: 0 msec
;; SERVER: 127.0.0.1#5335(127.0.0.1) (UDP)
;; WHEN: Tue Apr 23 20:10:43 PDT 2024
;; MSG SIZE  rcvd: 122

BUT, this fails:

> dig +dnssec @127.0.0.1 -p 5335 minisforum.com                                                                                                            ✔ ╱ with tony@bogey-pi-rp5 ╱ at 20:07:20 
;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out

; <<>> DiG 9.18.24-1-Debian <<>> +dnssec @127.0.0.1 -p 5335 minisforum.com
; (1 server found)
;; global options: +cmd
;; no servers could be reached

However, if I force using 1.1.1.1 as the DNS resolver:

> dig +dnssec @1.1.1.1 -p 53 minisforum.com                                                                                                                ✔ ╱ with tony@bogey-pi-rp5 ╱ at 20:10:43 

; <<>> DiG 9.18.24-1-Debian <<>> +dnssec @1.1.1.1 -p 53 minisforum.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62029
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 1232
;; QUESTION SECTION:
;minisforum.com.			IN	A

;; ANSWER SECTION:
minisforum.com.		600	IN	A	54.177.249.210

;; Query time: 232 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Tue Apr 23 20:12:49 PDT 2024
;; MSG SIZE  rcvd: 59

No errors seem to show up in my UnBound log.

> sudo service unbound status                                                                                                                              ✔ ╱ with tony@bogey-pi-rp5 ╱ at 20:12:49 
● unbound.service - Unbound DNS server
     Loaded: loaded (/lib/systemd/system/unbound.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-04-23 20:02:41 PDT; 11min ago
       Docs: man:unbound(8)
    Process: 890 ExecStartPre=/usr/libexec/unbound-helper chroot_setup (code=exited, status=0/SUCCESS)
    Process: 903 ExecStartPre=/usr/libexec/unbound-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
   Main PID: 905 (unbound)
      Tasks: 1 (limit: 9248)
        CPU: 432ms
     CGroup: /system.slice/unbound.service
             └─905 /usr/sbin/unbound -d -p

Apr 23 20:02:40 bogey-pi-rp5 systemd[1]: Starting unbound.service - Unbound DNS server...
Apr 23 20:02:41 bogey-pi-rp5 systemd[1]: Started unbound.service - Unbound DNS server.

EDIT: Add TriCorder Debug: https://tricorder.pi-hole.net/IVF5PVUz/

Are these all being run from the same machine (ref the slightly different prompt in each case)?

Yes. All commands/output executed on thePiHole itself (bogey-pi-rp5.local or 192.168.1.3).