Hi Thomas
As I said it's hard to answer without all the code, but...
I think the body.queue_free and queue free are the issue.
You are removing a body during a collision with body.queue_free and removing the whole object with queue_free.
I would remove queue_free from your code to start and see if this helps. Using queue_free removes the object and the code, so I'm assuming you don't want to do this.
Hope this helps, any further help needs to be asked in the forum.
All the best.