How do I remove object position change delay?

Godot Version

4.4

Question

I have an object (technically it’s an Area2d, but I tried it with a RigidBody2D as well) that is supposed to go to the player’s position every frame.

func _process(delta: float) -> void:
	if carried == true:
		global_position = %Ant.global_position

And it does, but it has a delay. How do I get rid of it? (The delay is probably like 1 frame.)

I figured it out. Instead of having the object move every frame, have the player call a function after they move in the object that has it move to the player.