Accept the fact that most people talk behind other people’s backs. It’s human nature.
That said, try not to be a person who says bad things about others when they’re not around. Observe your behaviour and keep negative statements in check. What goes around comes around! Stand out from the rest. Be the one with integrity.
Make more friends and allies. People will be less likely to say bad things about you if there’s one loyal person there to stand up for you. Therefore be pleasant to everyone, and don’t strike up unnecessary arguments. These allies will form a protective cordon when you’re not around. Be sure to also be a loyal friend!