Keep just one water bottle in the door, and move it all the way to the left (nearest the door hinges).
This reduces the speed at which the bottle moves when you open the door: excessive speed causes the bottles to fall over.
Put the rest of the bottles in the bottle rack.
lifehacks.stackexchange.com/users/5307/Hobbes
Another option: The reason the bottles fall over, is that they have room to wobble.
The tray is much wider than the bottle diameter.
If you fill the space between the bottle and the front wall of the tray, the bottle will have no room to wobble and fall over.
I've called this a "bottle holder" in the image below.
You could build this from cardboard, wood or whatever you have lying around.
Bottles also work, as long as they fill all of the available space and leave no room for a bottle to wobble.
From your image, 4 bottles isn't quite enough, you need another one (perhaps smaller in diameter) to fill the remaining space.
lifehacks.stackexchange.com/users/5307/Hobbes
The shelf appears to be too wide.
HACK:
Make the shelf narrower.
Make and use a divider from an elastic bungee cord or a large elastic band.
Stretch and place a loop around the whole door shelf to form a "front" and "back" row.
While the elastic separator will "give" enough to tuck a bottle either in front or behind it, it will (or should be) strong enough to keep an unstable bottle upright.
The ones I would suggest are about 2 cm wide and stretch up to a metre.
I don't know for what use they were originally intended—I have a few I use for holding parts for glueing.
It will (or should) also stretch enough to keep its "friends" (milk and juice) close-by on either side well-heeled.
Good luck.
lifehacks.stackexchange.com/users/4698/Stan
As Hobbes pointed out, the bottles fall over because they have room to wobble.
So pack the empty space in the door shelf with other things from your fridge (like bottles of condiments).
When you get a new large bottle of water / milk / juice, take out the smaller bottles to make room for it, and put those smaller bottles back on the stationary fridge shelves where you usually keep them.
lifehacks.stackexchange.com/users/4198/BrettFromLA
There are so many things being shipped, various kinds of packing materials have become common.
Fold a sheet of bubble-wrap in half with the bubbles facing inward.
Use the resulting chubby, light, flat shelf-space-filler to put behind the heavy water bottle(s) so it/they don't wobble around.
You might want to stick a couple of "pillow paks" between bottles to make a snug fit.
Good luck.
lifehacks.stackexchange.com/users/4698/Stan
Rubber bands.
Preferably those of larger sizes that's not too elastic.
Just wrap one around a bottle that doesn't have the rounded bottom and the water bottle.
(or two rubber bands knotted together, if needed)
The likelihood of someone forcing the fridge door open hard enough to knock over two bottles, should be minimal.
I've never tried this in a fridge, but often did this on camping trips and such.
My bottles survived the journey on country roads in an upright position.
lifehacks.stackexchange.com/users/30084/OldBat
When opening or closing my refrigerator's door, the water bottle(s) stored there often fall sideways:   This is irritating, and as you can see, I did try to place a heavier bottle besides it, which helps a bit but still not enough.  Is there a way to keep the bottles always erect and preventing them from falling as in the above image?
How to keep the water bottles erect in the refrigerator door?
lifehacks.stackexchange.com
<kitchen>
lifehacks.stackexchange.com/questions/23655
lifehacks.stackexchange.com/users/1399/Shadow Wizard is Ear For You
The bottles likely fall over because they have room to wobble. Therefore, to stop them falling, you could create a divider using cardboard, an elastic bungee cord or some rubber bands. You could also pack the empty space in the door shelf with other things from your fridge. Alternatively, if there is just one bottle in the fridge, you could move it as close the hinge as possible. The options are to move the bottle all the way to the left, fill the space so there's no room to fall, make the shelf narrower, cover the bottle in bubble wrap or attach it to another bottle with an elastic band.
The bottles likely fall over because they have room to wobble. Therefore, to stop them falling, you could create a divider using cardboard, an elastic bungee cord or some rubber bands. You could also pack the empty space in the door shelf with other things from your fridge. Alternatively, if there is just one bottle in the fridge, you could move it as close the hinge as possible. You could keep just one water bottle in the door, and move it all the way to the left nearest the door hinges. But the reason the bottles fall over, is that they have room to wobble. If you fill the space between the bottle and the front wall of the tray, the bottle will have no room to wobble and fall over. You can pack the empty space in the door shelf with other things from your fridge like bottles of condiments or fold a sheet of  bubble-wrap.
If there is one water bottle in the door, move it all the way towards the hinges. Alternatively, if you fill the space between the bottle and the front wall of the tray, making the shelf narrower, the bottle will have no room to wobble and fall over. You may also pack the empty space in the door shelf with other things from your fridge. There are a few different tricks that you could use. Firstly, you could consider filling any available space between the bottles with other items or materials so that they cannot wobble and fall over. Another option would be to place just a single bottle near the door hinges and store the rest of the bottles elsewhere in the fridge. A third option would be to try and make the shelf in the fridge door narrower.
Move the bottle all the way to the left. Fill the space so the bottle has nowhere to fall. Make the shelf narrower. Pack the empty space with other things from the fridge. Cover it in bubble wrap. Attach it to another bottle with a rubber band.
You could keep just one water bottle in the door, and move it all the way to the left nearest the door hinges. But the reason the bottles fall over, is that they have room to wobble. If you fill the space between the bottle and the front wall of the tray, the bottle will have no room to wobble and fall over. You can pack the empty space in the door shelf with other things from your fridge like bottles of condiments or fold a sheet of  bubble-wrap.
Keep just one bottle in the door and place it near the hinges. Fill any available space between bottles with other items or material so that they can't wobble and fall over. Try to make the shelf narrower in your fridge door.