Īmēra pūkete: Duality transformations and the entanglement entropy of gauge theories