I have the 4s with the latest software ... I like to keep my mail on the server as well. I have several email accounts, including Gmail exchange. I can't find anything to change the gmail on the phone, but for my other email accounts, it's: settings>email account>advanced>delete from server: never. My choices are: never, seven days, when removed from inbox.
I think you have to change your delete settings for Gmail via the web interface. Go to the Gmail in your browser on your computer. Click email settings (upper right corner, with the gear). Go to "forwarding and POP/IMAP", then you can look at the settings. Under the POP settings, option 2, there are several choices, including the option to keep/delete gmails copy. Under the IMAP option, there are also choices, including archiving the message, and immediately deleting the message forever.
Hope this is what you are talking about.