A Huge reptile bit my Medium character and started a grapple using Improved Grab.
My character activated a Polymorph item and transformed into an elefant - which is Huge. Improved Grab says:
"Unless otherwise noted, Improved Grab works only against creatures at least one size category smaller. The creature has the option to conduct the grapple normally or simply use the part of its body it used in the Improved Grab to hold the opponent. If it chooses to do the latter, it takes -20 on grapple checks, but it is not considered grappled itself (...)" (MM, p. 310)
The reptile did not use the option of grappling with the stiff -20 penalty - because its bite was its only attack.
My DM decided that transforming to an elefant ended the grapple in this case. He decided the reptile had to start a new grapple without improved grab. I am happy about this, because otherwise my character would have been dead. But was that correct or DM's grace?