The fact of the matter is that when there are feelings involved and you like someone it doesn't matter if you're an actor a teacher a doctor a lawyer a receptionist – you can't really help it when you have feelings for someone.
It was difficult being a teacher and out of the closet in the '50s. By the time I retired the English department was proud of having a gay poet of a certain minor fame. It was a very satisfactory change!