Quick answer: Godot 4 RigidBody2D setting velocity inside body_entered handler resetting to zero? Mid-tick velocity set is overwritten by collision response - use call_deferred.

Bullet collides with wall; handler sets velocity to bounce; wall's collision response zeros it.

Defer the velocity set

call_deferred("set_linear_velocity", v)

Applies post-tick. Survives collision response.

Or use apply_impulse

Impulses accumulate; aren't overwritten by collision response.

Audit collision handlers

Each handler that mutates physics state. Defer or use impulses.

“Mid-tick mutations are unsafe. Deferral is the discipline.”

If your physics handlers mutate state, the deferral pattern is non-optional.

Related reading