I obviously don't understand a particular mechanic of transform -- how come it kept failing against the Gothitelle?
Transform doesn't work if you had already Transformed. The two Dittos Transformed into each other. Which is why it started Struggling so early - it only had 5PP left for Transform.