He flirts more openly with me when we are in public than when we are in private?
it could just be in his nature, maybe when your alone it is a different atmosphear and he doesn't want you to get the wrong idea, you know maybe it is all fun and games around others. but when your alone it changes and then it could get serious and he might not want you or his girlfriend to get the wrong idea. he might just be loyal alternatively he could be nervous something is going to happen. or he hasn't admitted his feelings for you or himself? does he do it with others as well? just his way of having a conversation and connecting with people? do you guys have history? do you want something extra from him? either way slippery slop be careful. (you don't need me to say this but still)
I’m confused why you’re concerning yourself with what a taken man thinks about you
First of all, what are you doing flirting with a guy who has a partner? If he is making a show of it in public, but not with you, think about who that is for. He's not doing it for your benefit. he's doing it to enhance his appearance in front of others, perhaps to make him look more virile. Stop doing it. It isn't appropriate for either one of you.