test the collision before you reach the wall , maybe it's a stupid idea , but give it a try , make invisible object before the wall and test collision on it not the actual wall
Ive tried, it works for moving the mouse slowly, but when your moving it fast, you clip through the wall, cause construct cant test it fast enough