It's not a case of avoiding it, it;'s a case of buying the right deodorant, the cheaper ones are rubbish and are made to coat the skin to clog the pores, you need something made to be absorbed quickly and work longer during your day, i suggest Dove anti-perspirant deodorant, some sticks are just deodorants and so need to coat your skin thicker but have no anti-perspirant properties to actively prevent the problem,
Also, you should always wait until a few minutes after putting on the the deo before dressing, to give it a chance to dry. I agree with Sure Crystal and Dove. Always best to use something unscented and alcohol free too,