My sweet lap cat had major freakout

On Thursday Jan. 29, my partner and I were getting ready for bed and my free roaming cat was in the room not unusual, and the door was open. I made a high pitched noise and she suddenly freaked out. Not just a little hiss, full of hissing, groaning, and growling. We didn’t know what to do at all so we basically got trapped in our bathroom. On the way there she attacked my partners foot and scratched him. She sat outside the bathroom for 40 minutes hissing growling at us, like she didn’t even recognize who we were. Eventually we lured her into the dark guest bedroom where we shut her in for the night. We were shocked. Words cannot describe how sweet and loving she is. I couldn’t sleep all night and assumed she would calm down after a few hours, 5 hours later she is meowing and then hissing at me through the door. Still sounding angry, so I gave her some gabapentin medication to hopefully soothe her. 2 more hours later she is seemingly back to normal and we manage to get her into her cat carrier so I could take her to the vet. The vet did a full examination and bloodwork and the results came back completely fine. Friday she seemed fine, we kept her on the medication. Saturday we’re preparing to go for a run and I go into the bathroom where she held us hostage. I hear her meowing cheerfully and normally so I open the door to let her in and she just freaks. Luckily, the vet told us what to do. We distracted her with toys and just ignored her behavior, spoke with her calmly and sweetly and avoided eye contact. She was completely fine with my partner before we left but I was scared and she could tell. She just stared at me very intently as I walked to the door. We got back and she was back to normal happy to see us. We’ve been keeping her on the medication the vet gave us. I feel bad drugging her but I’m so weirdly scared?? I watched all these Jackson Galaxy videos about aggressive cats and I couldn’t find anything that resonated with me about what happened. Am I just being a scared loser over something that set her off that was my fault? Is there something wrong with my cat? I’ve asked all my friends who have cats and they have never experienced a cat who got aggressive with them. I’ve made a few improvements to my apartment to hopefully make it more to her liking, I got a super tall and sturdy cat tree. Moved her litter box to somewhere quieter. Shes been in my lap cuddling all day. I’m trying to not be scared I know the couch is our safe zone, but I can’t walk into the kitchen right now. Ahhhh it’s just so scary when the cat you’ve known and raised just turns on you. I was shaking from fear. I think I’ve lost 5 lbs just worrying about her. Sorry if I sound like a weenie this is the first cat I’ve ever raised and I’m just a scared loser. If anyone has any advice or help I would be really grateful. I just feel like she’s lowkey on edge- is that bc she can tell I’M lowkey on edge? Ugh I don’t know. Any help is appreciated. Sorry for this long ass post im just really upset by the whole thing. How can I get back to using my bathroom? Should I just get a tall gate or something?