I have to baby ball pythons and have always kept them in a decided cage. Well they kept breaking the divider or trying to make a break for the other side when the cage was open. They like to sleep together. I separate and same thing happens. I put them in separate cages and they both refuse to eat. When they are out by each other they are always touching. So I have read a lot that says ball pythons are solitary animals and I tend to disagree at least with mine.
The link that was posted is probably the best source of opinions you’ll see.
As far as with your little ones…
How long have you had them? Seems like you discovered one of the first major things about snake keeping. Snakes are escape artists. Thankfully it seems like your overall cage is pretty secure since they haven’t made it outside. But they will find any flaw and use it to their advantage as you see with the divider.
I would double check to see if there’s a reason for it. Is it always one snake trying to go to the other side?
Double check your temperatures on both sides. if you’re using one heat pad to heat both sides, they may just be sensing more heat there and trying to get there. I would try using heat sources on different sides if that’s the case.
If one side of the cage is quieter, for example up against the corner wall and the other is more open to activity that can be another issue. BPs can get anxious around a lot of activity from big scary things.
When you put them into separate cages, how long are you waiting before feeding them? It can take up to two weeks before they fully acclimate to a new enclosure.
I have never heard of a ball python not eating do to loneliness. Not eating could be for many reasons, but I don’t think loneliness would he one of them.
Reasons - temperature, not feeling secure, to much distraction, new environment, handling before feeding, Possible eating better do to competition (if feeding together), and I am sure there are many more.
Just some info… I had a temp setup once. A glass enclosure, divided with plexiglass. Heat was centered and glass I tried covered and not. One would always get to the other side, no matter what side I had it on. So the set up was not the reason for it. We had no eating problems, that I can remember. But, I never fed them when together, or just after moving them. The cage, we covered on all sides, except for the front. And we did cover the front when feeding so they would not be distracted.
We did eventually moved one to a storage bin, after several escapes to the other side. They keep eating without issues. After the move, it could take a week or two for them to settle in before eating again. This is normal for any situation. Be patient after the move and you might need to skip a week of feeding to get them eating again.