You have to choose then. One or the other. No point beating around the bush.

Maybe explain that the sex has to stop if you want to stick with your girlfriend. If you really are good friends she'll understand. If you don't like the sound of that then you both have to break off your relationships and try a relationship (a proper one) together.