I have an update. I was informed that back in 2023 some of the used method used to work differently. Right now, the same macro with corrections looks like this:
Now you should specify the columns that you want to hide as a string, i.e. "B". If you want to hide/unhide multiple columns, then provide several values as an array like: ["B", "D"].