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

protected:
	bool _set(const StringName &p_name, const Variant &p_value);
	bool _get(const StringName &p_name, Variant &r_ret) const;
	void _get_property_list(List<PropertyInfo> *p_list) const;
	void _notification(int p_what);
	GDVIRTUAL1(_integrate_forces, PhysicsDirectBodyState3D *)
	static void _body_state_changed_callback(void *p_instance, PhysicsDirectBodyState3D *p_state);
	void _body_state_changed(PhysicsDirectBodyState3D *p_state);
	static void _bind_methods();
private:
	static Skeleton3D *find_skeleton_parent(Node *p_parent);
	void _update_joint_offset();
	void _fix_joint_offset();
	void _reload_joint();
public:
	void _on_bone_parent_changed();
	void set_linear_velocity(const Vector3 &p_velocity);
	Vector3 get_linear_velocity() const override;
	void set_angular_velocity(const Vector3 &p_velocity);
	Vector3 get_angular_velocity() const override;
	void set_use_custom_integrator(bool p_enable);
	bool is_using_custom_integrator();
#ifdef TOOLS_ENABLED
	void _set_gizmo_move_joint(bool p_move_joint);
	virtual Transform3D get_global_gizmo_transform() const override;
	virtual Transform3D get_local_gizmo_transform() const override;
#endif
	const JointData *get_joint_data() const;
	Skeleton3D *find_skeleton_parent();
	int get_bone_id() const {