How to fix a house window that falls out?
There doesn't appear to be too much holding them in at the best of times. Unless you want to replace the entire window you should look at getting the top and bottom sills (or whatever they're called where you are) straight. From your description I would say that there is a pretty significant difference in the opening when measured at the edges and the middle. That shouldn't be the case at all.

Remove the trim from at least the top and bottom of the window frame and shim the top and bottom as required until you have a nice even distance all the way across. Then replace the trim and touch up the paintwork as required.