Convert Mouse Location to World Space seems to be inaccurate?

detecting a thin box
collision placed on the floor of the
terrain, which is completely flat.

Here’s a method that does not rely on geometry, making such box redundant (but you may have other uses for it, ofc)

Think of this as of a virtual plane positioned at Plane Origin and facing along the Plane Normal. The returned intersection would be the world location where the line hits that plane.

Here’s a visualisation and an example: