I know you thought he needed to say goodbye to some imaginary friend.
Kids can have really strange best friends and you can’t predict who they might be. The boy you saw is Deacon and he wouldn’t move until he said goodbye to his very special friend.
When everyone expected that to be another boy or pet, O’Dea showed up. Somehow they created special bond and they will probably stay in touch after Deacon moves out of this neighborhood.
As you can see, friendship knows no boundaries and it can happen and last even between a 2-year-old and a garbage man.