Is this skip ad macros fail in the latest version of Safari

There are plenty of free browser extensions that block ads. You could save yourself the headache by trying a couple out.

By the way, you don't need to use keyboard shortcuts to press the Skip button, you can just do the following. Notice that if you are enjoying the ad's first five seconds this macro will let you watch the ad if you move the mouse to the top of the screen. (Occasionally I will do that.) And notice that it makes sure the website contains the string "Youtube", which prevents possible strange behaviour on other websites.

I have a lot of macros which behave differently depending upon where the user places the mouse pointer on the screen (top, left, right , bottom.)

If you see the "No Thanks" button in the code below, I think you can remove that, because it doesn't appear to work on Youtube's popups. But I forgot to delete it. I've been using this macro for months or years, so if anyone tells you it's bad code, just remember that it works.