if parents allow their kids to be on their own at church, and they leave Sunday school or wander the building before, during, or after church services, what is the church's liability? What is the responsibility of class teachers to monitor students who leave the room (on the pretext of a bathroom break) and don't return?
To start, the field of legal liability is quite complex. For the extent to which your church stands legally liable on any issue, consult your church's attorney. With that disclaimer out of the way, let's more directly address your question, and I'll use experience as our guide.
I suggest you approach this issue by first considering who's primarily responsible for a child's care at any given moment. If a child's parents, grandparents, or guardian has not given you the responsibility for care, then the child remains under their watch. Assuming your church uses a formal registration process for children entering your ministry, then the transfer of responsibility stands easy to see. When the child is in your care, you have all the responsibility until the child formally leaves your care. That statement applies to kids of all ages. Clarity about whose care a child remains under is the key element.