That’s because your epsr function should now take ∇(u) as the first argument since you are composing it with (∇(u),tags), e.g.
function epsr(∇u, tag)
if tag == box_tag
return epsr_box * ∇u
elseif tag == sphere_tag
return epsr_sphere * ∇u
end
end
(similar to the tutorial I linked),