I have the same enclosed as you (or at least same brand, mine is the T8). And both my Mexican Black King and Ball Python have done this. Not so much anymore, but the ball used to do it often. If you don't know, or haven't seen them do it, it definitely looks like they're stuck. I think it's just the inquisitive nature. They get on in there, thinking they can go further, then just hang out there.
Sent from my SM-N950U using Tapatalk