First of all, it is ok for friends to make some harmless jokes when interacting. But be careful not to tell dirty jokes, especially to boys and girls. Or discuss the topic of assuming that the other person is your lover, which is very easy to daydream.
Secondly, friends of the opposite sex must avoid frequent physical contact during communication, and friends of the opposite sex must avoid frequent physical contact during communication. Observe the principle that men and women are different. After all, the other person is a friend of a different sex from you. Especially some ambiguous actions such as holding hands and touching your head, hooking your shoulders and so on. Keeping a proper distance is a respect for your friendship.
Secondly, when friends of the opposite sex are in contact, they must avoid going out for dating and eating alone. It's okay to be single, but once you have a partner, this behavior is very disrespectful to the other half. Even if there are inevitable reasons to go out with friends of the opposite sex, it is best for a group of people, even if they are alone, to bring their loved ones or inform them in advance.
Finally, try to avoid too frequent and warm contact between friends of the opposite sex. It's better to call them by their first names, rather than some ambiguous nicknames. One more thing, don't chat with each other in the middle of the night, it's very easy to go wrong. Talk to help when there is something, and don't talk nonsense when there is nothing. A hedge between keeps friendship green.