It's a sort of grey area you're in, being a high school student in a public school I assume. Some states like CA have a strict warrant only search law. However, generally the assumption to search must follow two guidelines..
Also, it needs to be known that school authorities do not need to have probable cause to search your phone whereas police do. You're really looking at a grey area depending on which state you're in. However, you are still protected by the 4th amendment. Private schools however, have much more authority in the manner they can conduct searches on students. Police cannot force you to unlock your phone with faceID, touchID, or passcode without a warrant.