In Dark of the Moon, there was the slow motion moment on the highway chase scene where Bumblebee not only transforms, but ejects Sam out of his vehicle as he did so. He then transformed around Sam afterwards.
In Age of Extinction there was another slow motion with Cade, Tessa and Shane being ejected from Bumblebee as he transformed and basically tossed them to Optimus, who transformed around them.
In the Last Knight, Hot Rod transformed and ejected Vivian.
And also (somewhat transforming), Cade and Vivian were inside of Bumblebee and he used his guns against Barricade.
(Not in the movies)
In Prime, both Bulkhead and Wheeljack had transformed with Miko inside, though not noticing/remembering at first.
In Rescue Bots, Heatwave transformed with Kade still inside on purpose because Kade made him a bit angry.