I think that one will be with me for life. It happened multiple times a day for decades. When my neighbor down the hall unlocks their door, I get a mini version of it. Partners I’ve lived with for years, it happens with them.
For me, it was trying desperately to guess what the right thing was for me to be doing when they walked in without knowing their mood 100%. I could sometimes guess by their footsteps and how aggressively they turned the lock, but until they walked in and I could read them, it was a high alert danger anxiety and fear.
Should I sit on the couch silently? No, normal people don’t just sit like that doing nothing. Do I clean something? Maybe, but then they’ll criticize you for not doing it right or avoiding something else. Do I hide in my room? Maybe, but then I won’t be able to see their face and it’s just prolonging the fear and they may think I’m don’t care they’re home. Etc, etc…
It did often result in aimless pacing. There was no answer to it and I was always wrong. Like, my existence there was wrong.