If a Imposter Ditto comes into battle, transforms, then gets Gastro Acided, will Ditto become a Ditto again?
No but whatever ability Ditto copied would be nullified EG.
Ditto(Imposeter) vrs. Gavantula(Compound eyes)
Ditto comes in and becomes Gavantula everything is copied except HP Stat and IVs
Gavantula uses Gastro-acid, Ditto loses Compound eyes.