Quick answer: Unity Physics.Raycast not hitting a trigger collider you can see in the scene? Project setting Queries Hit Triggers defaults to true but per-query overrides exist - check the QueryTriggerInteraction arg.

Interaction raycast misses a trigger volume marked for pickups. Editor shows the collider; the cast walks right through it.

Override per query

Physics.Raycast(origin, dir, out hit, max, mask,
  QueryTriggerInteraction.Collide);

Explicit at the call site beats relying on the project setting. The default UseGlobal reads Physics > Queries Hit Triggers, which a teammate may have flipped.

Verify the layer mask

If the trigger is on a layer the mask excludes, the QueryTriggerInteraction arg won't help. Print (mask & (1 << layer)) != 0 at the call site.

Don't mix with OverlapSphereNonAlloc

Some overload signatures don't accept QueryTriggerInteraction. Use the explicit overload that does, or rely on the project setting alone.

“Trigger handling in Physics queries is configurable in three places. Pick one and document it.”

Establish a project convention: gameplay queries use Collide, line-of-sight uses Ignore. Codify in a helper wrapper.