Hi, this made me think of something I'd heard about recently called the frequency Illusion. Maybe it will help to know that it is a thing:
https://science.howstuffworks.com/life/inside-the-mind/human-brain/baader-meinhof-phenomenon.htm
Your description of how you felt and your perception shifting strangely sounds familiar. People do speak of such experiences, more often as deja vu. This sounds like an anxiety attack as you said, as they are usually preceded by unsettling thoughts and a build of stress and worry in general.
https://science.howstuffworks.com/life/inside-the-mind/human-brain/baader-meinhof-phenomenon.htm
Your description of how you felt and your perception shifting strangely sounds familiar. People do speak of such experiences, more often as deja vu. This sounds like an anxiety attack as you said, as they are usually preceded by unsettling thoughts and a build of stress and worry in general.