After every spell of living with a roommate, I always revert back to solo living, until I run short on money, and then I slide into shared living again haha.
I think it's hard for me to give very general advice, since so many of my social interactions in general depend on who the other person is and what they respond to. But to offer one reflection:
In my experience, a lot depends on the physical space (though not as much as the person themselves). Some of my better shared living cases were ones where we had enough of our own spaces, that we could choose if/when to have open doors, share common spaces, without feeling like we couldn't access a space (for anxiety or for conflict) because they might be there etc. My least successful ones tended to have less private space and more reliance on the shared spaces -- I haven't felt trapped / like I'm hiding in my roosm since I was a young child and my parents had people over. This is not something that's easy to change if you don't have great space, but it's an example of why it's valuable to a) explicitly talk about use of space [even if you want to frame it as "if I had a bad day and needed not to be interacted with, etc, how would we communicate or navigate that") and b) think about even how furniture is arranged.