It's because of things like this—not to mention the added overhead/middleman—that I think ad blocking at the DNS level is the best way to go. With both Android and iOS supporting encrypted DNS system-wide, blocking at the DNS level is more convenient than ever (mobile & wifi are covered, no need to set DNS for each wifi network, etc.).
I realize of course, though, that DNS level blocking is mostly a non-starter with regards to YouTube since the ads are served up from the same domains as the videos (mostly? generally? not certain here).
I run a Pi-Hole on my local network, and I still see YouTube ads -- they're served from the same CDN as the videos. The way in which YT delivers ads (pre-, mid-, and post-roll videos on the same CDN/domain as the content) seems, on the surface, to thwart any type of static ad detection.
This is more of a rant on Pi-hole than related to Youtube ads but...
Pi-hole can be fine but it isn't effective if you want it to block not only the lowest hanging fruits which a browser adblocker could easily block too but also stuff that doesn't follow the rules and might use hardcoded DNS IPs if they can't get the reply they want from the DNS server. With some Windows PC's, Apple devices, Chromecasts and Androids I quickly saw Pi-hole hang because of tens of thousands of requests if I tried to force all DNS through it. Because I'm a geek I turned to my homelab instead of the RPI4 and ended up with two nginx load balancers with two Pi-holes behind each (yes, 4 Pi-holes). Even though they were now running in virtual machines on a dual Xeon HP Proliant they still died when they got flooded. The hardware could easily take the hammering of requests but the software not so much (often the counter skyrocketed to 40000 requests before it died). Now I just block 100% of DNS requests at the gateway/firewall (OPNsense) instead and oh boy does it catch and log a lot of stuff the Pi-hole didn't. The amount of software that use hardcoded DNS, make example.com requests and try to reach RFC TEST-NET IPs is just staggering.
Sorry about the rant but just in case you didn't know that Pi-hole is only effective against good network citizens like, well, now you know.
Switched a few years ago and it's great!