I think you’d be able to get it in a little ways before top of the box pushes against its own lid, preventing it from going in any further. If the lid pops back open, then the top of the box will begin sticking out of the box which will likely make it too wide to fit all the way through the wall portal.
But the rules of Portal is that the portals themselves break when moved by any substantial extent anyways so in the game it would just disable the portal altogether.
I think you’d be able to get it in a little ways before top of the box pushes against its own lid, preventing it from going in any further. If the lid pops back open, then the top of the box will begin sticking out of the box which will likely make it too wide to fit all the way through the wall portal.
But the rules of Portal is that the portals themselves break when moved by any substantial extent anyways so in the game it would just disable the portal altogether.