Your GM is likely correct.
If we look at the rules for Swallow Whole, they state:
If a creature with this special attack begins its turn with an opponent grappled in its mouth (see Grab), it can attempt a new combat maneuver check (as though attempting to pin the opponent). If it succeeds, it swallows its prey, and the opponent takes bite damage. Unless otherwise noted, the opponent can be up to one size category Smaller than the swallowing creature. Being swallowed causes a creature to take damage each round. The amount and type of damage varies and is given in the creature’s statistics. A swallowed creature keeps the grappled condition, while the creature that did the swallowing does not. A swallowed creature can try to cut its way free with any light slashing or piercing weapon (the amount of cutting damage required to get free is equal to 1/10 the creature’s total hit points), or it can just try to escape the grapple. The Armor Class of the interior of a creature that swallows whole is normally 10 + 1/2 its natural armor bonus, with no modifiers for size or Dexterity. If a swallowed creature cuts its way out, the swallowing creature cannot use swallow whole again until the damage is healed. If the swallowed creature escapes the grapple, success puts it back in the attacker’s mouth, where it may be bitten or swallowed again.
Nowhere in there does it state you are treated like a held item, therefore you would not be polymorphed with it. Likewise, a familiar in a Familiar Satchel would not be merged with you if you polymorphed, as it is not an object.
Now if we look at Baleful Polymorph, it says:
... If the spell succeeds, the subject must also make a Will save. If this second save fails, the creature loses its extraordinary, supernatural, and spell-like abilities, loses its ability to cast spells (if it had the ability), and gains the alignment, special abilities, and Intelligence, Wisdom, and Charisma scores of its new form in place of its own. ...
Assuming the creature failed the second save, it would have lost the Swallow Whole ability, this would mean that you are no longer able to be swallowed by it. Thus you would be disgorged from its body.