I downloaded the project and found good news and bad news.
The good news is that the issue is not the Gridmap or the collision shapes in the Gridmap. Enabling visible collision shapes in the Godot editor (Debug
-> Visible Collision Shapes
) shows that the size of the collision shapes is correct.
The bad news is, the issue seems to be because of the seams between collision shapes. I tested this by placing one of the red StaticBody rectangles after the first one, and on the seam it has the same issue. I also tried increasing the collision shape margin, as @Megalomaniak suggested, but it didn't solve the issue.
I'm not sure where the issue is, to be honest.
I'm wondering if the issue is in code, but I'm not sure where it would be and I currently do not have the time to take a detailed look through the code and how it works. I did a few quick tests but I couldn't find a solution or what may be causing the issue.
It could also be a physics bug, but again, I'm not sure.