Reproduction steps:
1. Open the attached project
2. Select "Source" GameObject
3. Move it so it creates a line between itself and "Target" GameObject that is interrupted by cube
4. Inspect how the line is interrupted by cube
5. In the Inspector toggle off and on one by one "Use Raycast Hit" and "Use Raycast"
6. Move "Source" GameObject inside the cube
7. In the Inspector toggle off "Use Raycast Hit"
Expected result: Line is interrupted
Actual result: Line is not interrupted
Reproducible with: 2020.3.37f1, 2021.3.6f1, 2022.1.10f1, 2022.2.0b2, 2023.1.0a4
Reproducible on: Windows 10