"now it's trying to protect you. It's kind of a defense mechanism" Sounds like a professional opinion to me.
The mind will never hurt us intentionally. It will do anything it can to protect us.
You stated you have anxiety and panic attacks. There's your answer. It can cause anything.
Like kday said, you're probably experiencing depersonalization/derealization. I know how weird it seems, and it's so hard to explain to anyone else. I kept trying to tell my mom that it was like I was stuck in a glass bubble....like I could see everything and hear everything but I wasn't a part of it. I just wasn't here, I wasn't real, everything was off. It's scary, but it does go away. You have to try your hardest to ignore it. I thought it would never go away and I hated it, but now I don't even remember when it stopped, it just did. I stopped worrying about it and it went away. I think basically your brain has been through a trauma....your panic attack.....and now it's trying to protect you. It's kind of a defense mechanism, your brain is trying to stay calm, and if nothing is real then nothing can hurt you, right? That's what your brain is thinking, in my totally nonprofessional opinion.
Hang in there, it will get better.
You may be experiencing depersonalization/derealization symptoms.
It's a common neurological symptom that can ride along with anxiety.