How can I get clicked positions in Intersection

Hi, I am trying to get the size of two points, which I made by clicking an object. But The (STL) object is situated in ( < div < ) container which does not have 100% width and height. The container has like (W: 800px H: 500px). And when I click with the mouse, point A appears around my click and not where I clicked. I’ve tried to calculate with canvas (W:H), and with window (W:H) like clientWidth clientHeight. But it doesn’t work.
But when I set the container width to 100% and height to 100vh it works very well.
Thank you.