CharacterBody2Ds stacking on top of each other prevents the bottom one from moving

Godot Version

4.7.1

Question

I have a player and an enemy which are on separate layers that collide with each other. If the enemy is on top of the player or vice versa, whichever one is at the bottom sometimes can’t move. The velocity of the bottom one is still stored and continues moving it after there isn’t anything on top of it.

I have tried adding a safe margin. It worked to some extent, but it still slows down the bottom CharacterBody2D and when there are more enemies in the stack, it completely stops the bottom ones.

“Slide on Ceiling” is enabled for both, all Moving Platform floor layers are disabled.

[edit]
changing the shape of the CollisionShape2D did fix this but I don’t like this solution (I want a square)
[edit2]
decided to go with a CollisionPolygon2D with the shape of a square with a pointy top that extends off by a few pixels (feel free to give better suggestions though since it still doesn’t work that well under many other colliders)