I was using
tcolorbox for creating a new box for theorems following this post: How to create theorem boxes.
The problem is that it's not avoiding page breaks. I used a box on a pretty big proof, and it is starting on a new page. Is there a way to avoid this?