It could be for any number of reasons.
The Macro might be disabled.
The Group it is in might be disabled or not enabled for Safari.
Things might have changed in Safari since you made the Macro.
Try the below. It works for me to toggle showing or hiding the Sidebar with a single shortcut.
Yes, I like to re-define keys using menu items as that keeps the original default shortcut alongside my new one (or allows me to use the original shortcut to do something else using KM). Also, makes it easy to see at a glance what the Macro is actually doing.
Also, notice how the menu item is written as Show Sidebar|Hide Sidebar - this allows the the Macro to toggle the menu item depending on which menu item is showing at the time.