Running into corners causes player to slowly rise

When the player repeatedly runs into a corner, like of a room or a corner created by objects, they slowly start glitchily rising up the wall or object. The game is an FPS, and there’s no jump button, but the level has stairs and slopes, so locking the player’s Y position isn’t an option.

I believe the issue has something to do with gravity. I have a downward 50 force attached to the player, to increase the speed at which they fall, even without it, however, the problem still occurs, and only when there are no Y forces acting upon the player does the problem not occur.

How would I go about fixing this?

are the corners mesh colliders? I find that my player can go through them half way and hang or climb like yours is. Making it a box collider fixed it. If NOT mesh collider then maybe try angling the box collider inward toward the play area? Else, a roof collider like connorwforman said

After messing around with the physics, it turns out that increasing the Default Solver Velocity Iterations fixed the problem (was 1, now 12) and i no longer increase in y-position when jittering in a corner.

I have the same problem, but I wouldn’t like to increase Default Solver Velocity Interations, as it costs performance. Any other workarounds anyone?

Add a second collider above where the rising starts, so it is blocked from rising.