Hey, trust me most of us all have our weird things going on like this, that's just unique to ourselves based on childhood wounds, fears or even suppressed deep emotional pain like rejection, so I 100% get you I did this a lot when I was younger mainly with just being way too obnoxious as a mask of myself for attention, and then years later a complete hermit just encapsulated in a shell of fear to let myself out truly but I never knew how.
Ive gone through seasons where I've become completely shut off, unemotional and almost dead with 'friends' in my life and this has gone on for years, last year I was actually a lot like this but it was because of pressures in my life I was prioritising over connections and really needing to find myself more, and I was like you I was okay with everyone leaving, In fact, I intentionally left a school with all my friends and built up connections just for a fresh start. People thought I was so strange for being so easy to pick my things up and leave. But I was staying true to myself at least so I completely understand you. Maybe the mimicking behaviour could be because a fear of rejection, or fear of not being good enough just as who you are in This world and thats why maybe you feel need to mask up? Ive always been like this too (not to your extreme), but I would never be genuine in myself, id only connect on meaningless topics and try to say what I thought people wanted to hear because I was too scared I wouldn't be accepted or loved as me, which was a very real thing. Im still working on it too, but ill tell you the best thing for me, is just to really start appreciating myself on a deep level and seeing I really am worthy and deserving. Knowing my worth really doesn't lie in others and their approval because truth is its your life and you wanna do whats most fulfilling inside. And also, whats helped me is only doing what I love for a while and it just helps me to stay more authentic inside and not so focused on superficial perceptions which I used to obsess over. Your intrinsic worth just as who you are is sooo valuable, please don't ever forget that and dont let anyone make you feel less or not as good.
We're all on our own journeys, but these feelings won't last forever. Your not a shitty friend, your just going through something inside, thats okay. I'm still dealing with this sense of detachment from real genuine connection but its a process its all gonna work out, just like you will, don't stress 2 much xx