Hello. You are using
RecipeIngredient::whereNotIn('id',$ingredients_updated)
->where('recipe_id',$recipe->id)
->delete();
RecipeDirection::whereNotIn('id',$directions_updated)
->where('recipe_id',$recipe->id)
->delete();
$recipe->ingredients()->sync($ingredients_updated);
$recipe->directions()->sync($directions_updated);