### 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)

void set_bounce(real_t p_bounce);
	real_t get_bounce() const;
	void set_gravity_scale(real_t p_gravity_scale);
	real_t get_gravity_scale() const;
	void set_linear_damp_mode(DampMode p_mode);
	DampMode get_linear_damp_mode() const;
	void set_angular_damp_mode(DampMode p_mode);
	DampMode get_angular_damp_mode() const;
	void set_linear_damp(real_t p_linear_damp);
	real_t get_linear_damp() const;
	void set_angular_damp(real_t p_angular_damp);
	real_t get_angular_damp() const;
	void set_can_sleep(bool p_active);
	bool is_able_to_sleep() const;
	void apply_central_impulse(const Vector3 &p_impulse);
	void apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position = Vector3());
	void reset_physics_simulation_state();
	void reset_to_rest_position();
	PhysicalBone3D();
	~PhysicalBone3D();
private:
	void update_bone_id();
	void update_offset();
	void _start_physics_simulation();
	void _stop_physics_simulation();
};
VARIANT_ENUM_CAST(PhysicalBone3D::JointType);
VARIANT_ENUM_CAST(PhysicalBone3D::DampMode);
#endif