In this episode, it seems like Goten is weakened before being taken over by Baby but was Trunks not in the similar condition ie weekend, in this episode, yet he was able to resist and succeeded to stop Baby taking over him. Why couldn't Goten do the same? Gohan on the other side wasn't hurt a bit; how could he be taken over so easily?
Trunks has always been stronger than Goten.
When they learned to merge, in the Buu Saga, this was clearly proven, since as Piccolo said, Trunks had to lower their power level, to get equal to Goten, and Goten needed to increase his so that both were in balance and can merge.
So maybe, because of that difference in power, Goten could be controlled, but not Trunks.