I've setup a VPN connection using AnchorFree.com on my iPhone 4 which works great, the issue I have is when my iPhone goes to sleep or screen locks the VPN connection appears to auto disconnect and doesn't reconnect unless I manually make it. I saw a thread here on apples forums confirming others are seeing this issue but no real solution.
I have just signed up for VPN service this week and I have been having the same problem. I use it to watch Netflix and listen to Pandora from out of the country. I have been playing around to see if I can get the VPN to stay connected; so far I found a solution that has been working for about an hour or so now.
I have a jailbroken iPhone 4 and I have installed backgrounder from Cydia which keeps programs running even when closed or when the screen is off.
After installing this, I installed Pandora from the App Store and, after launching it, I held down the home button to background it.
So far, it seems to be working because Pandora uses my connection and if I keep it backgrounded, it will prevent the VPN from disconnecting.
I have only been using it for a couple of hours so I'm not sure how good of a permanent solution it will be.