Leave during prep

My lunch is at 9:45am everyday. It’s just not realistic for me to eat lunch at that time and most places nearby aren’t even open for lunch yet lol. I have a prep at 12:30 everyday but sometimes I forget lunch and want to go out but my principal said I cannot leave the building and cannot switch my lunch and prep. I’m sure it’s in the contract but I’m lazy, can I really not leave during prep