I'm exactly the same. It's a bit difficult to hide on top of the cupboard or behind the dresser now at my age, but if I could I probably would. It's in my instinct to just hide from people. Technically I'm not actually diagnosed with AS (although I believe I have it) so I can't say for sure if it's an AS trait. Perhaps it could be related to Avoidant personality disorder.
When I was a child I used to leave my grandparents flat without telling anyone, and go back into our own flat a couple of storey's down. Even if the door was locked, I'd find a way in through the small gaps in burglar proofing of the window. I felt so content knowing I was alone in the flat with no one else there.
I used to hide on top of one cupboard to actively avoid family members. I kept my colouring books, crayons and pencils up there, so I could have something to do when I climbed up there. I also remember my 4th birthday, when all my cousins and second cousins (and their parents) as well as neighbours were invited. There was a pic which showed me clinging onto my mum, not wanting to join in, even though the event was for me.
But still today I actively avoid people when they come to visit at my home. I guess it's still in me to hide in my room, and only coming out when they're gone. Since I basically know no one, it's not people who come to visit me, otherwise I would be forced to interact with them, which would be very awkward. Whether this is an AS trait, I can't say for sure. Maybe some diagnosed aspies on the site, will be able to verify it.