weird mouse tolerance

Im making a game (https://microstudio.io/i/xblowdame/tile_chunk_game22/), in the game it is for now just a tile drawer, but when i try to get the tile grid pos, the tile is offset by a few pixels.

Does anybody know why this happens?