Why does this happen? (Video Included)

99% of the code shown is useless.

You are using the character.
The character handles things.
No need to line trace, or update a component. Which causes issues.

The movemenet compont is the one responsible for movement. You have several settings on it that allow you to define how it reacts.

If the intention is to duck when you hit a wall.

First of all, you need to trigger the crouched statate for the capsule to shrink.

Sexond, you can detect collision off the capsule component.
Because it automatically uses sweep, it should allow you to untoggle the crouch once its not being pushed around.

Probably add a check that velocity is 0 - whichay have to be a location value in world space check over 2 or 3 frames.
I don’t think being pushed by objects alters your velocity…