After this happened, we checked with a staff member whether we're allowed to lock the door, and they said of course, it's up to you whether you want privacy.
I can't believe you thought you needed permission to lock the door. You weren't at school needing to ask the teacher!
Like I said on page 1 it isn't about whether you are allowed to or not. You asked about etiquette which is not the same thing. But if you want to keep locking the door and monopolising a space the majority of people think should be shared you need to develop a thicker skin. Which you won't do by running to teacher to ask permission.