Hi! I understand you feel badly about this, however your instructor was right in her rationalization of this. As an RN you cannot just walk off your nursing unit without making sure there is another RN covering for you and she knows where you are. So, lesson learned. You won't do this again, I bet. More importantly, you'll most likely never do it when you start working as an RN.
You will make many, many mistakes as a student and as an RN. Hopefully, none of them will be serious and none of them will be done deliberately. We all have to deal with this kind of situation many times throughout our careers. The real question is, how are you going to handle it? The best way is to appologize, show some remorse, do not get defensive, and then make a mental note of how to handle this situation the next time the opportunity presents itself. No one is perfect. The good thing here is that you're not a pilgrim named Hester Prynne and having to wear a big, red "A" on your chest. It'd look pretty strange on your uniform, anyway.
While your instructor may have been a little harsh, I think she made her point with you. She did it to emphasize the importance of your future role as the supervisor of the patients and caregivers you will be working with. That is a very important concept for you to learn. She's not failing you for the entire course, is she?