Securing a battery into a plastic case can be challenging.
The most secure way would be to bolt some brackets into the box which would hold the battery rigidly in place. This may however break the waterproof integrity of the case, so is not ideal.
A method which I have found to be quick, easy and good enough, is to use strips of adhesive Velcro.
In the example shown, the case has curved corners between the sides and the bottom, so I’ve used some plywood as a standoff to create a 90 degree angle, held in place by Velcro.
I’ve then covered the side of the battery in contact with the box bottom with adhesive Velcro and stuck it down. When the box is in use and horizontal, the weight of the battery pushes down on the Velcro, and when the box is standing upright, the weight is taken by the plywood packing so does not stress the Velcro.
In normal use, this seems to adequately hold the battery in place. Dropping the box from a height on its left hand end might dislodge it, but that’s not a risk I feel the need to mitigate, given the use case I have.
If the battery does become loose, it can be easily Velcro’d back in position.
I put the battery against the side to take advantage of the bracing it offered, but it does make the box a bit unbalanced when carrying, so if I did it again I’d put the battery in the middle, and probably use a LiFe battery to reduce the weight.