DON'T FEAR THE FOAM!!!!
In all seriousness, the foam is your friend. It's designed that way so it clings and creeps into all the nooks and crannies. It won't hurt anything to have foam in it, you actually want foam, whatever bugs are getting foam on them are dead. When I bottle, I purposely make a ton of foam in my bottling bucket by shaking it with some Starsan in it. That way when I rack my beer into it, a big Starsan foam blanket rides on top of the beer as it fills up. Whatever dust, hair, etc. that falls into it hits foam first and not beer. The inventor of Starsan, Charlie Talley, drank a pint of it on a Basic Brewing show to prove that it's totally non-toxic when mixed properly.
When you rinse off the sanitizer, you're defeating the purpose, unless you're using boiled water or something, which is a pain. Starsan FTW.