I got this little game, the player can walk towards a tree, get inside its area2d to be able to chop it down.
But if there's another tree colliding with the player at the same time, when I chop one tree down (queue_frees it), I can't chop the other tree until I walk out of the area and then walk inside the area again.
How could I make it so it doesn't matter if an area dissapears? If the player is still inside an area, I want it to still be able to chop the other tree down.
This is the player's script:

This is how the scene looks, with two trees overlapping and the player touching both tree's areas:

(The red areas of the trees are the ones allowing the player to chop them down)
(The little green/yellow area of the player is the one that detects the red area of trees)
And this is how the _process func of the player looks like:

I understand the problem, I just don't know how to solve it. I saw something about "overlapping_areas()" but I don't know how to use it properly for this case.