Why is my player character sliding when touching enemy collider?

Hi, when ever the player character is running into the enemy and their colliders touch, the player starts sliding of in a different direction. I have a rigidbody attached with gravity and iskinematic disabled and i freezed the rotation on all aixs, and its not the code because when the player dies i disable the movement but the character still sliding. When I enable the isKinematic then it stops the sliding before they touch but then the player can walk through walls and stuff.

I was thinking if the player get super close to the enemy collider then enable isKinematic, but then what if the player is really close to a wall at the same time, they’ll just be able to pass through it. I dont know whats causing it to slide, I also tried reducing the size of the collider but it still does the same thing.
I’m using a capsule collider for my character

Thanks!

It might be due to the linear drag in the rigidbody component. Try changing it to a higher value.