When my player object (kinematic body) is in contact with the barriers I set up (collisionShape2D nodes), it screws up the collision with enemy mobs and stops them from despawning on contact. This is my first project and I have no clue what could be causing this.
This is my collision code on my player node:
var collision_check = move_and_collide(motion * delta)
# Check for collision with enemies
if collision_check != null && collision_check.collider.is_in_group("Targets"):
VIdeo of bug