Child items from cart are not being removed when Parent is removed from cart

Our website currently has 2 customizable products where when selecting one of these parent products, they can choose choose a child product. When adding to cart, all child products are discounted to free and the customer is billed for the parent item. The issue we’re having is when the parent item is removed, the child products are staying in the cart, and the pricing for the products remains free. We would like for the child products to automatically be removed from a card when their parent is removed.