girlfriend talking to her ex?

my girlfriend is still talking to her ex like quite often but they have always been close and had this weird bond and she will often go out with him, and she texts him all the time but he’s a fuck boy who flirts with everyone and it’s making me really jealous but i don’t want to stop her from talking to him because she says he’s jus a friend who’s there for her because he lives closer due to our long distance relationship should i get mad or do i need to deal with it?