Quick answer: Pass QueryTriggerInteraction.Ignore to the raycast, or set Physics.queriesHitTriggers = false globally. Triggers are included in queries by default.

A line-of-sight raycast reports “blocked” because it hit an invisible trigger volume — a damage zone, not real geometry.

Per-Call Override

bool blocked = Physics.Raycast(origin, dir, out RaycastHit hit, maxDist,
    layerMask, QueryTriggerInteraction.Ignore);

The last parameter explicitly excludes triggers for this query. Use this when most raycasts want triggers but a few don’t (or vice versa).

Global Default

Physics.queriesHitTriggers = false;   // once at startup

Sets the project-wide default for all queries that use QueryTriggerInteraction.UseGlobal. If your game rarely raycasts triggers, flip this off and forget about it.

Layer Mask Is Separate

A layer mask filters by layer, not by trigger-ness. A trigger on an included layer still gets hit unless you also set the trigger interaction. The two filters are independent — use both.

When You Do Want Triggers

Detecting whether a point is inside a damage zone does want triggers — use QueryTriggerInteraction.Collide there. The fix is being explicit per query, not turning triggers off everywhere blindly.

Verifying

LOS raycasts pass through trigger volumes and only stop on solid geometry. Zone-detection raycasts still register triggers. No more phantom blocks.

“Triggers are in queries by default. Be explicit per raycast with QueryTriggerInteraction.”

Set a sensible global default, then override only the handful of queries that need the other behavior.