A monolayer of swarming B. subtilis on semisolid agar is shown to display enhanced resistance against antibacterial drugs due to their collective behavior and motility. The dynamics of swarming motion, visualized in real time using time-lapse microscopy, prevents the bacteria from prolonged exposure to lethal drug concentrations. The elevated drug resistance is significantly reduced when the collective motion of bacteria is judiciously disrupted using nontoxic polystyrene colloidal particles immobilized on the agar surface. The colloidal particles block and hinder the motion of the cells, and force large swarming rafts to break up into smaller packs in order to maneuver across narrow spaces between densely packed particles. In this manner, cohesive rafts rapidly lose their collectivity, speed, and group dynamics, and the cells become vulnerable to the drugs. The antibiotic resistance capability of swarming B. subtilis is experimentally observed to be negatively correlated with the number density of colloidal particles on the engineered surface. This relationship is further tested using an improved self-propelled particle model that takes into account interparticle alignment and hard-core repulsion. This work has pertinent implications on the design of optimal methods to treat drug resistant bacteria commonly found in swarming colonies.