Open the developer tools and type document in the console. There is no cursor in there. There is no object representing the mouse pointer, no property to read for its position, and no way to ask a page where the pointer is at this instant. The browser does not keep a cursor. It keeps a history of movements that already happened.
What a page receives is a sequence of pointermove events. Each one carries a snapshot of the pointer at a moment in the past: where it was, which button was down, what pressure the sensor reported, and how long the browser believes it has been since the previous event. Between those events there is no information at all. The pointer's position is not something the browser knows; it is something the browser was told, once per event, and then let go of.
That single fact explains most of the strange behaviour people notice. A script cannot ask where the mouse is right now, it can only be notified. An application that reads the last known position lags by exactly one event. And a tab in the background stops receiving events altogether, so the stream it holds when you return is a gap, not a position.