Does this count as cheating?

My girlfriend and I have been dating for 7 months but this is our second time dating and our first lasted 9 months. During our last relationship she ended things with me because of ‘mental health reasons’ and said that we weren’t good together in that time of our life. It’s understandable because we were going through a rough patch. Just a few weeks before, she’d asked me if she could go to homecoming with one of her guy friends just as friends because i was out of the country on a trip. This same guy had given her flowers recently too, and she posted them online with a heart. I trusted her of course so i said yes even though it felt a little weird to me. After homecoming I saw pictures of them online standing a little too close together and she’d nonchalantly told me that he was touching her thigh under the table and stuff like that. We were going to different schools as well so I don’t really know how much they were together or all of that stuff. She did post him on her snapchat story a lot though. She broke up with me at the end of the month after all of that and then later on i found out that during the entire last month of our relationship she had feelings for him, and that that was one of the reasons she broke up with me. It was obvious but i trusted her and she still broke that trust.

We got together 9 months later and things are going so much better but I still am having issues with trusting her completely and i’m still terrified that if we get into a bad spot she’ll get distracted by someone else again. We’ve talked about it before but i still think about very often and it bothers me a lot, but since we’ve already talked about it and it was over a year ago im too embarrassed to say anything. She claims that this wasn’t cheating because she never actually did anything physical with him while we dated but she still had another person on her mind in our relationship so i kind of call it like “emotional cheating”? it still hurt me a lot but i feel as it’s not justified because she doesn’t recognize it as cheating.

this is a wlw relationship and i know we are still young and we have things to work on but i love this girl w my whole heart