I have been struggling for a couple of weeks with a weird error causing that collision detections stop working after some time. I asked here, without any solution to the problem, and also in reddit. But yesterday I found the cause, and the solution.
Seems that if my GameObject contains a rigid body, it interferes with BoxCastAll/SphereCastAll after some time (in my project, exactly one minute after the first collision). Collisions work for a while, and then stop working. Can somebody explain me why Rigid Bodies can interfere with collisions?
Maybe your rigidbody has gone to sleep. you can adjust sleep threshold in Project Settings → Physics.
Also you check if your rigidbody is sleeping via coding.
When the rigidbody is sleeping it is ignored by collision system. However i have had this issue even the times my rigidbody was moving but without any collision. I hope these will be fixed in unity 2019.2 with Havok Physics.