Line trace is triggered if it starts within collision, but only on some objects

Has anyone found a solution?
I have a similar problem and can’t figure out why it happens in a project while it doesn’t in other projects.