This is only true once your shield starts running low. If the Pikmin hit the shield, they'll pass through harmlessly (no shield damage, even). However, if the character's head is poking out and the Pikmin land there, they'll latch on.
You can launch a PK Freeze, shorthop, use PK Fire, release...