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

Vector3 get_linear_velocity() const override;
	void set_axis_velocity(const Vector3 &p_axis);
	void set_angular_velocity(const Vector3 &p_velocity);
	Vector3 get_angular_velocity() const override;
	Basis get_inverse_inertia_tensor() 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_use_custom_integrator(bool p_enable);
	bool is_using_custom_integrator();
	void set_sleeping(bool p_sleeping);
	bool is_sleeping() const;
	void set_can_sleep(bool p_active);
	bool is_able_to_sleep() const;
	void set_contact_monitor(bool p_enabled);
	bool is_contact_monitor_enabled() const;
	void set_max_contacts_reported(int p_amount);
	int get_max_contacts_reported() const;
	int get_contact_count() const;
	void set_use_continuous_collision_detection(bool p_enable);
	bool is_using_continuous_collision_detection() const;
	TypedArray<Node3D> get_colliding_bodies() const;
	void apply_central_impulse(const Vector3 &p_impulse);