oh, I've been using Chameleon, it does the same thing and even automatically change the user agent after a custom interval of time from a list you chose, but it kinda breaks the Youtube video UI if the browser is set to anything other than FF though.
And I also just got that pop-up today in LibreWolf and was eventually blocked. But on Firefox, nothing happens. I have 3 adblocking related extesions: UBO, Privacy Badger and Malwarebytes. Turns out it was Malwarebytes that triggered it. Whitelisting Youtube doesn't work, I had to straight up disable the extension. It seems it's not just ads and scams that Youtube want us to see, they want us to get malwares and viruses too.