Let me guess: did you think there was mouse movement there? Well... theoretically, it is, yes. If you click the mouse three times, then, as a rule, one of the clicks gives the result. But this is still a hemorrhoid. Because at close distances you just get tired of clicking, and at long distances you click and don't see if he moved there, behind the screen, or you need to click again. It's very inconvenient.
And yes, now do you know what else I remembered? Your hitboxes are weird :) That is, they are not hitboxes at all, but the meaning is the same. When you find out which building the character is standing under, as far as I understand, you take the corner point of his sprite. Most likely the lower left one. And you need to take the center! Because when two buildings stand one above the other, it turns out very strange. The player has already crawled into the upper one, where his heel is only touching the lower one, but the game confidently asserts that he is in the lower building. Again, it is constantly causing inconvenience.