### Godot version

Godot 4 stable and Godot 3.x LTS

### System information

Fedora linux

### Issue description

If you use some custom logic inside _integrate_forces() to alter the state linear velocity and there is any reference to linear_velocity in physics process, the result in godot 3.5 is that it moves just a little bit, while in godot 4 is totally still.

### Steps to reproduce

For the example i created a simple scene in which i apply a force on the linear velocity in  _integrate_forces()  and added a line that add zero to it in physics process. You will not see any move, but it will work fine if you comment the line adding zero.


### Minimal reproduction project

[PhysicsBugReproduction.zip](https://github.com/godotengine/godot/files/12139772/PhysicsBugReproduction.zip)

return platform_velocity;
}
const Vector3 &CharacterBody3D::get_platform_angular_velocity() const {
	return platform_angular_velocity;
}
Vector3 CharacterBody3D::get_linear_velocity() const {
	return get_real_velocity();
}
int CharacterBody3D::get_slide_collision_count() const {
	return motion_results.size();
}
PhysicsServer3D::MotionResult CharacterBody3D::get_slide_collision(int p_bounce) const {
	ERR_FAIL_INDEX_V(p_bounce, motion_results.size(), PhysicsServer3D::MotionResult());
	return motion_results[p_bounce];
}
Ref<KinematicCollision3D> CharacterBody3D::_get_slide_collision(int p_bounce) {
	ERR_FAIL_INDEX_V(p_bounce, motion_results.size(), Ref<KinematicCollision3D>());
	if (p_bounce >= slide_colliders.size()) {
		slide_colliders.resize(p_bounce + 1);
	}
	
	if (slide_colliders[p_bounce].is_null() || slide_colliders[p_bounce]->get_reference_count() > 1) {
		slide_colliders.write[p_bounce].instantiate();
		slide_colliders.write[p_bounce]->owner = this;
	}
	slide_colliders.write[p_bounce]->result = motion_results[p_bounce];
	return slide_colliders[p_bounce];
}
Ref<KinematicCollision3D> CharacterBody3D::_get_last_slide_collision() {