Astar pathfinder goes straight through blocks

is there a way to make exact collisions with astar pathfinding in 2d? My pathfinder obejct will just go through blocks no matter the configuration I set. I tried switching from AI Path component to AI Lerp, I tried changig the distance to pick next waypoint to 0.5, I tried changing the grid and I enabled the cut corners option, but I still have the same issue. My enemy calculates the path correctly, but decides to ignore it when getting close to the player and corners, and I cant find any solution online, can anyone help me please? I cannot calculate the grid navmesh further from the blocks since the enemy wouldnt be able to go through 1x gaps, so I dont know how to solve this.

There is no code involved, just the inspector settings.
recording-2024-08-31-21-45-06

Duplicate post, answered here one week ago:

Please do not make duplicate posts.