My friend ignores me after we had sex help

So I broke up in December 2019, and in February I reconnected with an old friend (more like an acquaintance, we went to the same college)

I'm 22 and he's 24. We have been hanging out quite often then, and I became good friends with his house mates. Then he told me he was interested in me, but noting that it was only 2 months after my breakup I decided not to jump into another relationship too quickly. Though I did feel a connection with him. I told him that I liked him too, but I wanted to make sure I don't rush it.

But two people attracted to each other, we eventually had sex. Then he told me that he doesn't want a relationship. I felt quite rejected, but was fine with it too. I needed to stay single for a while.

Then the virus happened, with lockdown and everything else I didn't see him for 2-3 months. My feelings for him faded and he hit me up around 2 weeks ago if we should just be friends with benefits, no strings attached. I genuinely think of him as a really good friend too even if we don't do anything.

I am still physically attracted to him though, and I am okay with that idea. He wanted to keep it lowkey and I have no problem with it either. We had sex about 3 times, and last time we had sex he asked me, "You'd tell me if you're seeing someone right?" I said that I certainly would, but I don't think it's anytime soon as I'm currently enjoying being single. Then he asked if I would come if he invited me to his house because they are having drinks for catching up with some mutual friends we have. I said I would.

The event was yesterday, and I honestly felt so shitty that I left really early. All of our other friends were asking about how we are and what we did during the lockdown etc, but he didn't even try to have a conversation with me. I felt like he was ignoring me though he was the one who invited me??

The worse thing was when he suddenly started flirting BIG TIME with another girl there right in front of me. It got quite annoying when they were openly flirting and touching each other right behind my seat too. I didn't know her very well. He talked to other friends, but only exchanged 2-3 sentences with me the whole night. I considered him one of my closest friends before, and now that he's treating me as though I'm invisible, I'm hurt.

I don't care if we stopped having sex, or keep that fact a secret, but he didn't need to shut me off or pretend not to acknowledge my presence. We can still be normal friends without anyone raising eyebrows? I just feel hurt that my friend pretends I'm invisible. I want to talk to him about it but I feel like I shouldn't. I haven't talked to him since

I don't know what to do