Hi! Try to make the pathfinding through the level using move and click player control. This is platformer. Need that player jump over or on the obstacle, if the height of it allow.
I created player tree to send signals
CharacterBody2D
----Animates sprite2d
----CollisonShape2D
-----Area2D (here set signal to CharacterBody2D)
-------->--CollisionShape2D (and here choose shape, that in front of the body detect obstacles)

`extends CharacterBody2D

const SPEED = 300.0
const JUMP_VELOCITY = -400.0
const AUTO_JUMP = -400.0

Get the gravity from the project settings to be synced with RigidBody nodes.

var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
var move_to_click := false
var target := 0.0
signal body #add this because the function asks parameters

func _ready():
pass

func _input(event):
if event.is_action_pressed("LeftClick"):
target = get_global_mouse_position().x
move_to_click = true

#function-signal from area2D-collisionshape2D
func _on_area_2d_body_entered(body):
if body.is_on_wall():
velocity.y = AUTO_JUMP

func _physics_process(delta: float) -> void:
if not is_on_floor():
velocity.y += gravity * delta

if Input.is_action_just_pressed("Jump") and is_on_floor():
	velocity.y = JUMP_VELOCITY

var direction := Input.get_axis("Left", "Right")
if !is_zero_approx(direction):
	#player wants to move with keys
	#so let's stop moving to the mouse click if we were
	move_to_click = false
	velocity.x = direction * SPEED
elif move_to_click:
	#player didn't press key and has a click to move to
	var dist := target - global_position.x
	var x:float = sign(dist) * SPEED
	if abs(x * delta) > abs(dist): #would we overshoot?
		x = dist / delta #get there in one physics frame
		move_to_click = false
	velocity.x = x
	while velocity.x:#if on the way to x will obstacle: jump
		_on_area_2d_body_entered(body)
else:
	velocity.x = move_toward(velocity.x, 0, SPEED)

move_and_slide()`

past one week, I solved this: added raycast nodes for left and right? added variables

@onready var raycast_right := $RayCastRight
@onready var raycast_left := $RayCastLeft
const AUTO_JUMP = -400.0

and at the end changed code:

elif move_to_click:
#player didn't press key and has a click to move to
var dist := target - global_position.x
var x:float = sign(dist) * SPEED
if abs(x * delta) > abs(dist): #would we overshoot?
x = dist / delta #get there in one physics frame
move_to_click = false
if raycast_right.is_colliding() or raycast_left.is_colliding():#auto_jumo condition
velocity.y = AUTO_JUMP
velocity.x = x
else:
velocity.x = move_toward(velocity.x, 0, SPEED)