Why don't trees block the sun flare?

My tree prefabs are set to layer “ignore raycast”.

My flare is a direction light with flare “sun”.

The flare goes right through the trees which looks unrealistic.

What’s the correct way to set this up? I notice my terrain blocks the flare, but not the trees that are part of the terrain.

The trees are editable by the tree editer built into unity, but they are attached to the terrain (not selectable in the hierarchy).

Flares are blocked by colliders, so if your tree does not have a collider then it will not block out the flare.