Linear transformations preserving potent matrices