Ok, I've prepared a small test folder with a simple HTML page and all the Javascript that I use: test.zip

To make the problem happen: click on the checkbox "Tipo" to hide the column with the same name. Click on it again to show it again. Up to this point everything works. Now click on it again to hide it and then click on "Espandi la tabella". You can see that the checkbox is being checked again but the column remains hidden.

Thank you very much in advance for your help!