The answer to this, and half the world’s problems, is in one piece of advice: You don’t have to respect someone, but you have to treat them with respect.
This means you also don’t have to like or agree with them. You don’t have to be their friend. You don’t even need to get into lunchtime talks with them. But you need to be respectful. Greet them, help them if they need assistance, don’t show hatred. If they talk about seeing their boyfriend or attending a pride rally, try to excuse yourself. Explain that you don’t discuss your out-of work activities or beliefs on company time, and you’d rather they do the same.
In your heart, feel free to dislike them, but not outwardly judge them. Most of this world’s problems, especially lately, are due to intolerance.