Collision KinematicBody2D don't work for StaticBody2D + KinematicBody2D + RigidBody2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By clappy

There is a stage at the entrance with three objects:

  1. Wall (StaticBody2D) - brown square
  2. Character (KinematicBody2D) - blue square
  3. Enemy (RigidBody2D) - red square

There are 2 quotes:

  1. The character is removed from the wall at some distance (in the
    picture it is 1 px). The enemy moves towards the character and upon
    reaching the character is removed.

  2. The character is located close to the wall. The enemy moves towards
    the character and upon reaching the character is NOT deleted
    (although it is expected to be deleted).

Collision detection method:

func _physics_process(delta):
	get_input()
	var collision = move_and_collide(velocity * delta, false)

	if collision:
		if ("enemies" in collision.collider.get_groups()):
			emit_signal("death")
			queue_free()

Two situations in the pictures:

The initial state of the scene before the enemy moves
The enemy moves from right to left
start scene

The final state of the scene after the end of the enemy’s movement.
end scene

It can be seen that in the second version the character is removed, because did not touch the wall, but the character remained when he stood close to the wall

Q: Is this correct or wrong behavior?

Q: What can be done so that a collision with an enemy is determined despite the fact that the character is standing close to the wall?

After some time
If you use RigidBody for the character, then everything works.
Note: if you have set character parameters RigidBody2D ContactMonitor = true and ContactReported = 1.

Q: Is this the only solution?