Caterpiller & caterpiller crap removal from buds

If I spray my plants to get rid of the caterpillars do they just leave or do they die in the buds? If they what is the most effective way to remove them?
Are the buds ruined? How do I “wash” the buds of caterpillar crap?
Can anyone help me please?

I am currently dealing with a catapillar as well. I bought BTK specifically for catapillars and essentially it starves them to death by preventing them from eatting once they ingest it. It is supposed to kill them eventually but I wouldn’t spray it in your in flower as it will absorb into the flowers and yuck. You can also use like a teaspoon of molasses and liquid dish soap to cover foilage as chewing bugs like catapillars cannot stand the taste. Other option is to plant catapillar friendly plants and they move onto those. If they are in the buds I have no experience there. I would assume they would kill that bud and it would start to mold and rot. But again no experience with them inside of bud.

Hydrogen peroxide bath after harvesting will really help with that.