How can I detect position if I use horizontal enable and vertical enable option activated?

Godot Version 4.3

Question

Hello everybody!
I have goal to get correct result of look_at(event.position)
I use Camera2D and I already make detection and it works correctly with this code:

func _input(event):
	if event is InputEventScreenTouch and !event.is_pressed():
		look_at(event.position-get_viewport_rect().size/2 + camera.global_position)

but if I try to use drag potion, look_at works incorrectly.

I tried:

camera.global_position - player.global_position
player.position - camera.global_position
camera.global_position - player.position
camera.position - player.position

And it still didn’t give me result that I want

May be someone can say me how ca I get correct result?

I’m so sorry but i’m only a 3d coder but let me think for a bit. Maybe i’ll figure it out so sorry tho.

Try get_target_position() or get_screen_center_position()