If it's a safety concern, you can stay hidden in the closet at school. But if you are going to be in a relationship with someone, you have to be honest with them and tell them about your identity. Some people are going to be ok with it and it could maybe lead to a happy relationship. Some people aren't going to be cool with it and might decide not to date you, but they should still know so they can make an informed decision for consent reasons. It's the responsible thing to do, it saves people from wasting their time, and it can prevent people from feeling betrayed/lied to.