Never happened to me (when I used some enclosures with sliding glass doors in the past) but I've heard of it happening to others, so ASSUME they can & will...it's way better than looking for your escaped snake that may also get injured from their escapade. Injuries can be an RI from being chilled, it can be from other household pets (cats & dogs), it can be scrapes or cuts or even electrocution from whatever they crawl into (they can be drawn to the warmth of a refrigerator
motor, for example). By all means just purchase a simple lock for the glass sliders, like they use in stores on display cases...easy & safe.