No single medication prevents both whipworm and lungworm in dogs. These parasites have different lifecycles, so treatments are often targeted.
Work with your veterinarian to create a prevention plan. This may include regular deworming, specific preventive medications for lungworm, good hygiene, and monitoring for signs of illness.
Your vet can recommend the best combination of treatments for your dog.